@aldiokta/protocgen 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/package.json +15 -0
  2. package/prisca/v1/core/auth/auth_grpc_pb.js +256 -0
  3. package/prisca/v1/core/auth/auth_pb.js +2801 -0
  4. package/prisca/v1/core/department_material/department_material_grpc_pb.js +144 -0
  5. package/prisca/v1/core/department_material/department_material_pb.js +2167 -0
  6. package/prisca/v1/core/material/material_grpc_pb.js +181 -0
  7. package/prisca/v1/core/material/material_pb.js +4016 -0
  8. package/prisca/v1/core/material_group/material_group_grpc_pb.js +177 -0
  9. package/prisca/v1/core/material_group/material_group_pb.js +2582 -0
  10. package/prisca/v1/core/material_type/material_type_grpc_pb.js +147 -0
  11. package/prisca/v1/core/material_type/material_type_pb.js +2369 -0
  12. package/prisca/v1/core/number_range/number_range_grpc_pb.js +177 -0
  13. package/prisca/v1/core/number_range/number_range_pb.js +2672 -0
  14. package/prisca/v1/core/procurement/procurement_grpc_pb.js +146 -0
  15. package/prisca/v1/core/procurement/procurement_pb.js +1681 -0
  16. package/prisca/v1/core/transaction_builder/transaction_builder_grpc_pb.js +354 -0
  17. package/prisca/v1/core/transaction_builder/transaction_builder_pb.js +4943 -0
  18. package/prisca/v1/core/unit_of_measurement/unit_of_measurement_grpc_pb.js +180 -0
  19. package/prisca/v1/core/unit_of_measurement/unit_of_measurement_pb.js +2798 -0
  20. package/prisca/v1/core/work_locations/work_locations_grpc_pb.js +17 -0
  21. package/prisca/v1/core/work_locations/work_locations_pb.js +328 -0
  22. package/prisca/v1/global/meta/meta_grpc_pb.js +1 -0
  23. package/prisca/v1/global/meta/meta_pb.js +1179 -0
@@ -0,0 +1,4016 @@
1
+ // source: prisca/v1/core/material/material.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 =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
25
+ goog.object.extend(proto, prisca_v1_global_meta_meta_pb);
26
+ var prisca_v1_core_material_type_material_type_pb = require('../../../../prisca/v1/core/material_type/material_type_pb.js');
27
+ goog.object.extend(proto, prisca_v1_core_material_type_material_type_pb);
28
+ var prisca_v1_core_material_group_material_group_pb = require('../../../../prisca/v1/core/material_group/material_group_pb.js');
29
+ goog.object.extend(proto, prisca_v1_core_material_group_material_group_pb);
30
+ var prisca_v1_core_work_locations_work_locations_pb = require('../../../../prisca/v1/core/work_locations/work_locations_pb.js');
31
+ goog.object.extend(proto, prisca_v1_core_work_locations_work_locations_pb);
32
+ var prisca_v1_core_unit_of_measurement_unit_of_measurement_pb = require('../../../../prisca/v1/core/unit_of_measurement/unit_of_measurement_pb.js');
33
+ goog.object.extend(proto, prisca_v1_core_unit_of_measurement_unit_of_measurement_pb);
34
+ goog.exportSymbol('proto.BaseMaterialRequest', null, global);
35
+ goog.exportSymbol('proto.CreateMaterialRequest', null, global);
36
+ goog.exportSymbol('proto.CreateMaterialResponse', null, global);
37
+ goog.exportSymbol('proto.DeleteMaterialRequest', null, global);
38
+ goog.exportSymbol('proto.DeleteMaterialResponse', null, global);
39
+ goog.exportSymbol('proto.GetListMaterialRequest', null, global);
40
+ goog.exportSymbol('proto.GetListMaterialResponse', null, global);
41
+ goog.exportSymbol('proto.GetMaterialByIdRequest', null, global);
42
+ goog.exportSymbol('proto.GetMaterialByIdResponse', null, global);
43
+ goog.exportSymbol('proto.Material', null, global);
44
+ goog.exportSymbol('proto.MaterialLanguageDescription', null, global);
45
+ goog.exportSymbol('proto.MaterialUOM', null, global);
46
+ goog.exportSymbol('proto.MaterialUOMRequest', null, global);
47
+ goog.exportSymbol('proto.UpdateMaterialRequest', null, global);
48
+ goog.exportSymbol('proto.UpdateMaterialResponse', null, global);
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ proto.Material = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.Material.repeatedFields_, null);
61
+ };
62
+ goog.inherits(proto.Material, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.Material.displayName = 'proto.Material';
69
+ }
70
+ /**
71
+ * Generated by JsPbCodeGenerator.
72
+ * @param {Array=} opt_data Optional initial data array, typically from a
73
+ * server response, or constructed directly in Javascript. The array is used
74
+ * in place and becomes part of the constructed object. It is not cloned.
75
+ * If no data is provided, the constructed object will be empty, but still
76
+ * valid.
77
+ * @extends {jspb.Message}
78
+ * @constructor
79
+ */
80
+ proto.MaterialLanguageDescription = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
+ };
83
+ goog.inherits(proto.MaterialLanguageDescription, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ proto.MaterialLanguageDescription.displayName = 'proto.MaterialLanguageDescription';
90
+ }
91
+ /**
92
+ * Generated by JsPbCodeGenerator.
93
+ * @param {Array=} opt_data Optional initial data array, typically from a
94
+ * server response, or constructed directly in Javascript. The array is used
95
+ * in place and becomes part of the constructed object. It is not cloned.
96
+ * If no data is provided, the constructed object will be empty, but still
97
+ * valid.
98
+ * @extends {jspb.Message}
99
+ * @constructor
100
+ */
101
+ proto.MaterialUOM = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(proto.MaterialUOM, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ proto.MaterialUOM.displayName = 'proto.MaterialUOM';
111
+ }
112
+ /**
113
+ * Generated by JsPbCodeGenerator.
114
+ * @param {Array=} opt_data Optional initial data array, typically from a
115
+ * server response, or constructed directly in Javascript. The array is used
116
+ * in place and becomes part of the constructed object. It is not cloned.
117
+ * If no data is provided, the constructed object will be empty, but still
118
+ * valid.
119
+ * @extends {jspb.Message}
120
+ * @constructor
121
+ */
122
+ proto.MaterialUOMRequest = function(opt_data) {
123
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
124
+ };
125
+ goog.inherits(proto.MaterialUOMRequest, jspb.Message);
126
+ if (goog.DEBUG && !COMPILED) {
127
+ /**
128
+ * @public
129
+ * @override
130
+ */
131
+ proto.MaterialUOMRequest.displayName = 'proto.MaterialUOMRequest';
132
+ }
133
+ /**
134
+ * Generated by JsPbCodeGenerator.
135
+ * @param {Array=} opt_data Optional initial data array, typically from a
136
+ * server response, or constructed directly in Javascript. The array is used
137
+ * in place and becomes part of the constructed object. It is not cloned.
138
+ * If no data is provided, the constructed object will be empty, but still
139
+ * valid.
140
+ * @extends {jspb.Message}
141
+ * @constructor
142
+ */
143
+ proto.BaseMaterialRequest = function(opt_data) {
144
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.BaseMaterialRequest.repeatedFields_, null);
145
+ };
146
+ goog.inherits(proto.BaseMaterialRequest, jspb.Message);
147
+ if (goog.DEBUG && !COMPILED) {
148
+ /**
149
+ * @public
150
+ * @override
151
+ */
152
+ proto.BaseMaterialRequest.displayName = 'proto.BaseMaterialRequest';
153
+ }
154
+ /**
155
+ * Generated by JsPbCodeGenerator.
156
+ * @param {Array=} opt_data Optional initial data array, typically from a
157
+ * server response, or constructed directly in Javascript. The array is used
158
+ * in place and becomes part of the constructed object. It is not cloned.
159
+ * If no data is provided, the constructed object will be empty, but still
160
+ * valid.
161
+ * @extends {jspb.Message}
162
+ * @constructor
163
+ */
164
+ proto.CreateMaterialRequest = function(opt_data) {
165
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
166
+ };
167
+ goog.inherits(proto.CreateMaterialRequest, jspb.Message);
168
+ if (goog.DEBUG && !COMPILED) {
169
+ /**
170
+ * @public
171
+ * @override
172
+ */
173
+ proto.CreateMaterialRequest.displayName = 'proto.CreateMaterialRequest';
174
+ }
175
+ /**
176
+ * Generated by JsPbCodeGenerator.
177
+ * @param {Array=} opt_data Optional initial data array, typically from a
178
+ * server response, or constructed directly in Javascript. The array is used
179
+ * in place and becomes part of the constructed object. It is not cloned.
180
+ * If no data is provided, the constructed object will be empty, but still
181
+ * valid.
182
+ * @extends {jspb.Message}
183
+ * @constructor
184
+ */
185
+ proto.UpdateMaterialRequest = function(opt_data) {
186
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
187
+ };
188
+ goog.inherits(proto.UpdateMaterialRequest, jspb.Message);
189
+ if (goog.DEBUG && !COMPILED) {
190
+ /**
191
+ * @public
192
+ * @override
193
+ */
194
+ proto.UpdateMaterialRequest.displayName = 'proto.UpdateMaterialRequest';
195
+ }
196
+ /**
197
+ * Generated by JsPbCodeGenerator.
198
+ * @param {Array=} opt_data Optional initial data array, typically from a
199
+ * server response, or constructed directly in Javascript. The array is used
200
+ * in place and becomes part of the constructed object. It is not cloned.
201
+ * If no data is provided, the constructed object will be empty, but still
202
+ * valid.
203
+ * @extends {jspb.Message}
204
+ * @constructor
205
+ */
206
+ proto.DeleteMaterialRequest = function(opt_data) {
207
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
208
+ };
209
+ goog.inherits(proto.DeleteMaterialRequest, jspb.Message);
210
+ if (goog.DEBUG && !COMPILED) {
211
+ /**
212
+ * @public
213
+ * @override
214
+ */
215
+ proto.DeleteMaterialRequest.displayName = 'proto.DeleteMaterialRequest';
216
+ }
217
+ /**
218
+ * Generated by JsPbCodeGenerator.
219
+ * @param {Array=} opt_data Optional initial data array, typically from a
220
+ * server response, or constructed directly in Javascript. The array is used
221
+ * in place and becomes part of the constructed object. It is not cloned.
222
+ * If no data is provided, the constructed object will be empty, but still
223
+ * valid.
224
+ * @extends {jspb.Message}
225
+ * @constructor
226
+ */
227
+ proto.GetMaterialByIdRequest = function(opt_data) {
228
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
229
+ };
230
+ goog.inherits(proto.GetMaterialByIdRequest, jspb.Message);
231
+ if (goog.DEBUG && !COMPILED) {
232
+ /**
233
+ * @public
234
+ * @override
235
+ */
236
+ proto.GetMaterialByIdRequest.displayName = 'proto.GetMaterialByIdRequest';
237
+ }
238
+ /**
239
+ * Generated by JsPbCodeGenerator.
240
+ * @param {Array=} opt_data Optional initial data array, typically from a
241
+ * server response, or constructed directly in Javascript. The array is used
242
+ * in place and becomes part of the constructed object. It is not cloned.
243
+ * If no data is provided, the constructed object will be empty, but still
244
+ * valid.
245
+ * @extends {jspb.Message}
246
+ * @constructor
247
+ */
248
+ proto.GetListMaterialRequest = function(opt_data) {
249
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
250
+ };
251
+ goog.inherits(proto.GetListMaterialRequest, jspb.Message);
252
+ if (goog.DEBUG && !COMPILED) {
253
+ /**
254
+ * @public
255
+ * @override
256
+ */
257
+ proto.GetListMaterialRequest.displayName = 'proto.GetListMaterialRequest';
258
+ }
259
+ /**
260
+ * Generated by JsPbCodeGenerator.
261
+ * @param {Array=} opt_data Optional initial data array, typically from a
262
+ * server response, or constructed directly in Javascript. The array is used
263
+ * in place and becomes part of the constructed object. It is not cloned.
264
+ * If no data is provided, the constructed object will be empty, but still
265
+ * valid.
266
+ * @extends {jspb.Message}
267
+ * @constructor
268
+ */
269
+ proto.CreateMaterialResponse = function(opt_data) {
270
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
271
+ };
272
+ goog.inherits(proto.CreateMaterialResponse, jspb.Message);
273
+ if (goog.DEBUG && !COMPILED) {
274
+ /**
275
+ * @public
276
+ * @override
277
+ */
278
+ proto.CreateMaterialResponse.displayName = 'proto.CreateMaterialResponse';
279
+ }
280
+ /**
281
+ * Generated by JsPbCodeGenerator.
282
+ * @param {Array=} opt_data Optional initial data array, typically from a
283
+ * server response, or constructed directly in Javascript. The array is used
284
+ * in place and becomes part of the constructed object. It is not cloned.
285
+ * If no data is provided, the constructed object will be empty, but still
286
+ * valid.
287
+ * @extends {jspb.Message}
288
+ * @constructor
289
+ */
290
+ proto.UpdateMaterialResponse = function(opt_data) {
291
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
292
+ };
293
+ goog.inherits(proto.UpdateMaterialResponse, jspb.Message);
294
+ if (goog.DEBUG && !COMPILED) {
295
+ /**
296
+ * @public
297
+ * @override
298
+ */
299
+ proto.UpdateMaterialResponse.displayName = 'proto.UpdateMaterialResponse';
300
+ }
301
+ /**
302
+ * Generated by JsPbCodeGenerator.
303
+ * @param {Array=} opt_data Optional initial data array, typically from a
304
+ * server response, or constructed directly in Javascript. The array is used
305
+ * in place and becomes part of the constructed object. It is not cloned.
306
+ * If no data is provided, the constructed object will be empty, but still
307
+ * valid.
308
+ * @extends {jspb.Message}
309
+ * @constructor
310
+ */
311
+ proto.DeleteMaterialResponse = function(opt_data) {
312
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
313
+ };
314
+ goog.inherits(proto.DeleteMaterialResponse, jspb.Message);
315
+ if (goog.DEBUG && !COMPILED) {
316
+ /**
317
+ * @public
318
+ * @override
319
+ */
320
+ proto.DeleteMaterialResponse.displayName = 'proto.DeleteMaterialResponse';
321
+ }
322
+ /**
323
+ * Generated by JsPbCodeGenerator.
324
+ * @param {Array=} opt_data Optional initial data array, typically from a
325
+ * server response, or constructed directly in Javascript. The array is used
326
+ * in place and becomes part of the constructed object. It is not cloned.
327
+ * If no data is provided, the constructed object will be empty, but still
328
+ * valid.
329
+ * @extends {jspb.Message}
330
+ * @constructor
331
+ */
332
+ proto.GetMaterialByIdResponse = function(opt_data) {
333
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
334
+ };
335
+ goog.inherits(proto.GetMaterialByIdResponse, jspb.Message);
336
+ if (goog.DEBUG && !COMPILED) {
337
+ /**
338
+ * @public
339
+ * @override
340
+ */
341
+ proto.GetMaterialByIdResponse.displayName = 'proto.GetMaterialByIdResponse';
342
+ }
343
+ /**
344
+ * Generated by JsPbCodeGenerator.
345
+ * @param {Array=} opt_data Optional initial data array, typically from a
346
+ * server response, or constructed directly in Javascript. The array is used
347
+ * in place and becomes part of the constructed object. It is not cloned.
348
+ * If no data is provided, the constructed object will be empty, but still
349
+ * valid.
350
+ * @extends {jspb.Message}
351
+ * @constructor
352
+ */
353
+ proto.GetListMaterialResponse = function(opt_data) {
354
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.GetListMaterialResponse.repeatedFields_, null);
355
+ };
356
+ goog.inherits(proto.GetListMaterialResponse, jspb.Message);
357
+ if (goog.DEBUG && !COMPILED) {
358
+ /**
359
+ * @public
360
+ * @override
361
+ */
362
+ proto.GetListMaterialResponse.displayName = 'proto.GetListMaterialResponse';
363
+ }
364
+
365
+ /**
366
+ * List of repeated fields within this message type.
367
+ * @private {!Array<number>}
368
+ * @const
369
+ */
370
+ proto.Material.repeatedFields_ = [8,15];
371
+
372
+
373
+
374
+ if (jspb.Message.GENERATE_TO_OBJECT) {
375
+ /**
376
+ * Creates an object representation of this proto.
377
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
378
+ * Optional fields that are not set will be set to undefined.
379
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
380
+ * For the list of reserved names please see:
381
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
382
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
383
+ * JSPB instance for transitional soy proto support:
384
+ * http://goto/soy-param-migration
385
+ * @return {!Object}
386
+ */
387
+ proto.Material.prototype.toObject = function(opt_includeInstance) {
388
+ return proto.Material.toObject(opt_includeInstance, this);
389
+ };
390
+
391
+
392
+ /**
393
+ * Static version of the {@see toObject} method.
394
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
395
+ * the JSPB instance for transitional soy proto support:
396
+ * http://goto/soy-param-migration
397
+ * @param {!proto.Material} msg The msg instance to transform.
398
+ * @return {!Object}
399
+ * @suppress {unusedLocalVariables} f is only used for nested messages
400
+ */
401
+ proto.Material.toObject = function(includeInstance, msg) {
402
+ var f, obj = {
403
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
404
+ materialCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
405
+ materialDescription: jspb.Message.getFieldWithDefault(msg, 3, ""),
406
+ materialCategory: jspb.Message.getFieldWithDefault(msg, 4, ""),
407
+ oldProductNumber: jspb.Message.getFieldWithDefault(msg, 5, 0),
408
+ materialGroupRef: jspb.Message.getFieldWithDefault(msg, 6, 0),
409
+ referencesId: jspb.Message.getFieldWithDefault(msg, 7, ""),
410
+ languageDescriptionList: jspb.Message.toObjectList(msg.getLanguageDescriptionList(),
411
+ proto.MaterialLanguageDescription.toObject, includeInstance),
412
+ createdBy: jspb.Message.getFieldWithDefault(msg, 9, ""),
413
+ updatedBy: jspb.Message.getFieldWithDefault(msg, 10, ""),
414
+ createdAt: jspb.Message.getFieldWithDefault(msg, 11, ""),
415
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 12, ""),
416
+ baseUnitOfMeasureRef: jspb.Message.getFieldWithDefault(msg, 13, 0),
417
+ baseUnitOfMeasure: (f = msg.getBaseUnitOfMeasure()) && prisca_v1_core_unit_of_measurement_unit_of_measurement_pb.UnitOfMeasure.toObject(includeInstance, f),
418
+ unitOfMeasureList: jspb.Message.toObjectList(msg.getUnitOfMeasureList(),
419
+ proto.MaterialUOM.toObject, includeInstance),
420
+ materialType: (f = msg.getMaterialType()) && prisca_v1_core_material_type_material_type_pb.MaterialType.toObject(includeInstance, f),
421
+ materialGroup: (f = msg.getMaterialGroup()) && prisca_v1_core_material_group_material_group_pb.MaterialGroup.toObject(includeInstance, f),
422
+ materialPlantRef: jspb.Message.getFieldWithDefault(msg, 18, 0),
423
+ materialPlant: (f = msg.getMaterialPlant()) && prisca_v1_core_work_locations_work_locations_pb.WorkLocations.toObject(includeInstance, f)
424
+ };
425
+
426
+ if (includeInstance) {
427
+ obj.$jspbMessageInstance = msg;
428
+ }
429
+ return obj;
430
+ };
431
+ }
432
+
433
+
434
+ /**
435
+ * Deserializes binary data (in protobuf wire format).
436
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
437
+ * @return {!proto.Material}
438
+ */
439
+ proto.Material.deserializeBinary = function(bytes) {
440
+ var reader = new jspb.BinaryReader(bytes);
441
+ var msg = new proto.Material;
442
+ return proto.Material.deserializeBinaryFromReader(msg, reader);
443
+ };
444
+
445
+
446
+ /**
447
+ * Deserializes binary data (in protobuf wire format) from the
448
+ * given reader into the given message object.
449
+ * @param {!proto.Material} msg The message object to deserialize into.
450
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
451
+ * @return {!proto.Material}
452
+ */
453
+ proto.Material.deserializeBinaryFromReader = function(msg, reader) {
454
+ while (reader.nextField()) {
455
+ if (reader.isEndGroup()) {
456
+ break;
457
+ }
458
+ var field = reader.getFieldNumber();
459
+ switch (field) {
460
+ case 1:
461
+ var value = /** @type {number} */ (reader.readInt64());
462
+ msg.setId(value);
463
+ break;
464
+ case 2:
465
+ var value = /** @type {string} */ (reader.readString());
466
+ msg.setMaterialCode(value);
467
+ break;
468
+ case 3:
469
+ var value = /** @type {string} */ (reader.readString());
470
+ msg.setMaterialDescription(value);
471
+ break;
472
+ case 4:
473
+ var value = /** @type {string} */ (reader.readString());
474
+ msg.setMaterialCategory(value);
475
+ break;
476
+ case 5:
477
+ var value = /** @type {number} */ (reader.readInt64());
478
+ msg.setOldProductNumber(value);
479
+ break;
480
+ case 6:
481
+ var value = /** @type {number} */ (reader.readInt64());
482
+ msg.setMaterialGroupRef(value);
483
+ break;
484
+ case 7:
485
+ var value = /** @type {string} */ (reader.readString());
486
+ msg.setReferencesId(value);
487
+ break;
488
+ case 8:
489
+ var value = new proto.MaterialLanguageDescription;
490
+ reader.readMessage(value,proto.MaterialLanguageDescription.deserializeBinaryFromReader);
491
+ msg.addLanguageDescription(value);
492
+ break;
493
+ case 9:
494
+ var value = /** @type {string} */ (reader.readString());
495
+ msg.setCreatedBy(value);
496
+ break;
497
+ case 10:
498
+ var value = /** @type {string} */ (reader.readString());
499
+ msg.setUpdatedBy(value);
500
+ break;
501
+ case 11:
502
+ var value = /** @type {string} */ (reader.readString());
503
+ msg.setCreatedAt(value);
504
+ break;
505
+ case 12:
506
+ var value = /** @type {string} */ (reader.readString());
507
+ msg.setUpdatedAt(value);
508
+ break;
509
+ case 13:
510
+ var value = /** @type {number} */ (reader.readInt64());
511
+ msg.setBaseUnitOfMeasureRef(value);
512
+ break;
513
+ case 14:
514
+ var value = new prisca_v1_core_unit_of_measurement_unit_of_measurement_pb.UnitOfMeasure;
515
+ reader.readMessage(value,prisca_v1_core_unit_of_measurement_unit_of_measurement_pb.UnitOfMeasure.deserializeBinaryFromReader);
516
+ msg.setBaseUnitOfMeasure(value);
517
+ break;
518
+ case 15:
519
+ var value = new proto.MaterialUOM;
520
+ reader.readMessage(value,proto.MaterialUOM.deserializeBinaryFromReader);
521
+ msg.addUnitOfMeasure(value);
522
+ break;
523
+ case 16:
524
+ var value = new prisca_v1_core_material_type_material_type_pb.MaterialType;
525
+ reader.readMessage(value,prisca_v1_core_material_type_material_type_pb.MaterialType.deserializeBinaryFromReader);
526
+ msg.setMaterialType(value);
527
+ break;
528
+ case 17:
529
+ var value = new prisca_v1_core_material_group_material_group_pb.MaterialGroup;
530
+ reader.readMessage(value,prisca_v1_core_material_group_material_group_pb.MaterialGroup.deserializeBinaryFromReader);
531
+ msg.setMaterialGroup(value);
532
+ break;
533
+ case 18:
534
+ var value = /** @type {number} */ (reader.readInt64());
535
+ msg.setMaterialPlantRef(value);
536
+ break;
537
+ case 19:
538
+ var value = new prisca_v1_core_work_locations_work_locations_pb.WorkLocations;
539
+ reader.readMessage(value,prisca_v1_core_work_locations_work_locations_pb.WorkLocations.deserializeBinaryFromReader);
540
+ msg.setMaterialPlant(value);
541
+ break;
542
+ default:
543
+ reader.skipField();
544
+ break;
545
+ }
546
+ }
547
+ return msg;
548
+ };
549
+
550
+
551
+ /**
552
+ * Serializes the message to binary data (in protobuf wire format).
553
+ * @return {!Uint8Array}
554
+ */
555
+ proto.Material.prototype.serializeBinary = function() {
556
+ var writer = new jspb.BinaryWriter();
557
+ proto.Material.serializeBinaryToWriter(this, writer);
558
+ return writer.getResultBuffer();
559
+ };
560
+
561
+
562
+ /**
563
+ * Serializes the given message to binary data (in protobuf wire
564
+ * format), writing to the given BinaryWriter.
565
+ * @param {!proto.Material} message
566
+ * @param {!jspb.BinaryWriter} writer
567
+ * @suppress {unusedLocalVariables} f is only used for nested messages
568
+ */
569
+ proto.Material.serializeBinaryToWriter = function(message, writer) {
570
+ var f = undefined;
571
+ f = message.getId();
572
+ if (f !== 0) {
573
+ writer.writeInt64(
574
+ 1,
575
+ f
576
+ );
577
+ }
578
+ f = message.getMaterialCode();
579
+ if (f.length > 0) {
580
+ writer.writeString(
581
+ 2,
582
+ f
583
+ );
584
+ }
585
+ f = message.getMaterialDescription();
586
+ if (f.length > 0) {
587
+ writer.writeString(
588
+ 3,
589
+ f
590
+ );
591
+ }
592
+ f = message.getMaterialCategory();
593
+ if (f.length > 0) {
594
+ writer.writeString(
595
+ 4,
596
+ f
597
+ );
598
+ }
599
+ f = message.getOldProductNumber();
600
+ if (f !== 0) {
601
+ writer.writeInt64(
602
+ 5,
603
+ f
604
+ );
605
+ }
606
+ f = message.getMaterialGroupRef();
607
+ if (f !== 0) {
608
+ writer.writeInt64(
609
+ 6,
610
+ f
611
+ );
612
+ }
613
+ f = message.getReferencesId();
614
+ if (f.length > 0) {
615
+ writer.writeString(
616
+ 7,
617
+ f
618
+ );
619
+ }
620
+ f = message.getLanguageDescriptionList();
621
+ if (f.length > 0) {
622
+ writer.writeRepeatedMessage(
623
+ 8,
624
+ f,
625
+ proto.MaterialLanguageDescription.serializeBinaryToWriter
626
+ );
627
+ }
628
+ f = message.getCreatedBy();
629
+ if (f.length > 0) {
630
+ writer.writeString(
631
+ 9,
632
+ f
633
+ );
634
+ }
635
+ f = message.getUpdatedBy();
636
+ if (f.length > 0) {
637
+ writer.writeString(
638
+ 10,
639
+ f
640
+ );
641
+ }
642
+ f = message.getCreatedAt();
643
+ if (f.length > 0) {
644
+ writer.writeString(
645
+ 11,
646
+ f
647
+ );
648
+ }
649
+ f = message.getUpdatedAt();
650
+ if (f.length > 0) {
651
+ writer.writeString(
652
+ 12,
653
+ f
654
+ );
655
+ }
656
+ f = message.getBaseUnitOfMeasureRef();
657
+ if (f !== 0) {
658
+ writer.writeInt64(
659
+ 13,
660
+ f
661
+ );
662
+ }
663
+ f = message.getBaseUnitOfMeasure();
664
+ if (f != null) {
665
+ writer.writeMessage(
666
+ 14,
667
+ f,
668
+ prisca_v1_core_unit_of_measurement_unit_of_measurement_pb.UnitOfMeasure.serializeBinaryToWriter
669
+ );
670
+ }
671
+ f = message.getUnitOfMeasureList();
672
+ if (f.length > 0) {
673
+ writer.writeRepeatedMessage(
674
+ 15,
675
+ f,
676
+ proto.MaterialUOM.serializeBinaryToWriter
677
+ );
678
+ }
679
+ f = message.getMaterialType();
680
+ if (f != null) {
681
+ writer.writeMessage(
682
+ 16,
683
+ f,
684
+ prisca_v1_core_material_type_material_type_pb.MaterialType.serializeBinaryToWriter
685
+ );
686
+ }
687
+ f = message.getMaterialGroup();
688
+ if (f != null) {
689
+ writer.writeMessage(
690
+ 17,
691
+ f,
692
+ prisca_v1_core_material_group_material_group_pb.MaterialGroup.serializeBinaryToWriter
693
+ );
694
+ }
695
+ f = message.getMaterialPlantRef();
696
+ if (f !== 0) {
697
+ writer.writeInt64(
698
+ 18,
699
+ f
700
+ );
701
+ }
702
+ f = message.getMaterialPlant();
703
+ if (f != null) {
704
+ writer.writeMessage(
705
+ 19,
706
+ f,
707
+ prisca_v1_core_work_locations_work_locations_pb.WorkLocations.serializeBinaryToWriter
708
+ );
709
+ }
710
+ };
711
+
712
+
713
+ /**
714
+ * optional int64 id = 1;
715
+ * @return {number}
716
+ */
717
+ proto.Material.prototype.getId = function() {
718
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
719
+ };
720
+
721
+
722
+ /**
723
+ * @param {number} value
724
+ * @return {!proto.Material} returns this
725
+ */
726
+ proto.Material.prototype.setId = function(value) {
727
+ return jspb.Message.setProto3IntField(this, 1, value);
728
+ };
729
+
730
+
731
+ /**
732
+ * optional string material_code = 2;
733
+ * @return {string}
734
+ */
735
+ proto.Material.prototype.getMaterialCode = function() {
736
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
737
+ };
738
+
739
+
740
+ /**
741
+ * @param {string} value
742
+ * @return {!proto.Material} returns this
743
+ */
744
+ proto.Material.prototype.setMaterialCode = function(value) {
745
+ return jspb.Message.setProto3StringField(this, 2, value);
746
+ };
747
+
748
+
749
+ /**
750
+ * optional string material_description = 3;
751
+ * @return {string}
752
+ */
753
+ proto.Material.prototype.getMaterialDescription = function() {
754
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
755
+ };
756
+
757
+
758
+ /**
759
+ * @param {string} value
760
+ * @return {!proto.Material} returns this
761
+ */
762
+ proto.Material.prototype.setMaterialDescription = function(value) {
763
+ return jspb.Message.setProto3StringField(this, 3, value);
764
+ };
765
+
766
+
767
+ /**
768
+ * optional string material_category = 4;
769
+ * @return {string}
770
+ */
771
+ proto.Material.prototype.getMaterialCategory = function() {
772
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
773
+ };
774
+
775
+
776
+ /**
777
+ * @param {string} value
778
+ * @return {!proto.Material} returns this
779
+ */
780
+ proto.Material.prototype.setMaterialCategory = function(value) {
781
+ return jspb.Message.setProto3StringField(this, 4, value);
782
+ };
783
+
784
+
785
+ /**
786
+ * optional int64 old_product_number = 5;
787
+ * @return {number}
788
+ */
789
+ proto.Material.prototype.getOldProductNumber = function() {
790
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
791
+ };
792
+
793
+
794
+ /**
795
+ * @param {number} value
796
+ * @return {!proto.Material} returns this
797
+ */
798
+ proto.Material.prototype.setOldProductNumber = function(value) {
799
+ return jspb.Message.setProto3IntField(this, 5, value);
800
+ };
801
+
802
+
803
+ /**
804
+ * optional int64 material_group_ref = 6;
805
+ * @return {number}
806
+ */
807
+ proto.Material.prototype.getMaterialGroupRef = function() {
808
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
809
+ };
810
+
811
+
812
+ /**
813
+ * @param {number} value
814
+ * @return {!proto.Material} returns this
815
+ */
816
+ proto.Material.prototype.setMaterialGroupRef = function(value) {
817
+ return jspb.Message.setProto3IntField(this, 6, value);
818
+ };
819
+
820
+
821
+ /**
822
+ * optional string references_id = 7;
823
+ * @return {string}
824
+ */
825
+ proto.Material.prototype.getReferencesId = function() {
826
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
827
+ };
828
+
829
+
830
+ /**
831
+ * @param {string} value
832
+ * @return {!proto.Material} returns this
833
+ */
834
+ proto.Material.prototype.setReferencesId = function(value) {
835
+ return jspb.Message.setProto3StringField(this, 7, value);
836
+ };
837
+
838
+
839
+ /**
840
+ * repeated MaterialLanguageDescription language_description = 8;
841
+ * @return {!Array<!proto.MaterialLanguageDescription>}
842
+ */
843
+ proto.Material.prototype.getLanguageDescriptionList = function() {
844
+ return /** @type{!Array<!proto.MaterialLanguageDescription>} */ (
845
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialLanguageDescription, 8));
846
+ };
847
+
848
+
849
+ /**
850
+ * @param {!Array<!proto.MaterialLanguageDescription>} value
851
+ * @return {!proto.Material} returns this
852
+ */
853
+ proto.Material.prototype.setLanguageDescriptionList = function(value) {
854
+ return jspb.Message.setRepeatedWrapperField(this, 8, value);
855
+ };
856
+
857
+
858
+ /**
859
+ * @param {!proto.MaterialLanguageDescription=} opt_value
860
+ * @param {number=} opt_index
861
+ * @return {!proto.MaterialLanguageDescription}
862
+ */
863
+ proto.Material.prototype.addLanguageDescription = function(opt_value, opt_index) {
864
+ return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.MaterialLanguageDescription, opt_index);
865
+ };
866
+
867
+
868
+ /**
869
+ * Clears the list making it empty but non-null.
870
+ * @return {!proto.Material} returns this
871
+ */
872
+ proto.Material.prototype.clearLanguageDescriptionList = function() {
873
+ return this.setLanguageDescriptionList([]);
874
+ };
875
+
876
+
877
+ /**
878
+ * optional string created_by = 9;
879
+ * @return {string}
880
+ */
881
+ proto.Material.prototype.getCreatedBy = function() {
882
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
883
+ };
884
+
885
+
886
+ /**
887
+ * @param {string} value
888
+ * @return {!proto.Material} returns this
889
+ */
890
+ proto.Material.prototype.setCreatedBy = function(value) {
891
+ return jspb.Message.setProto3StringField(this, 9, value);
892
+ };
893
+
894
+
895
+ /**
896
+ * optional string updated_by = 10;
897
+ * @return {string}
898
+ */
899
+ proto.Material.prototype.getUpdatedBy = function() {
900
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
901
+ };
902
+
903
+
904
+ /**
905
+ * @param {string} value
906
+ * @return {!proto.Material} returns this
907
+ */
908
+ proto.Material.prototype.setUpdatedBy = function(value) {
909
+ return jspb.Message.setProto3StringField(this, 10, value);
910
+ };
911
+
912
+
913
+ /**
914
+ * optional string created_at = 11;
915
+ * @return {string}
916
+ */
917
+ proto.Material.prototype.getCreatedAt = function() {
918
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
919
+ };
920
+
921
+
922
+ /**
923
+ * @param {string} value
924
+ * @return {!proto.Material} returns this
925
+ */
926
+ proto.Material.prototype.setCreatedAt = function(value) {
927
+ return jspb.Message.setProto3StringField(this, 11, value);
928
+ };
929
+
930
+
931
+ /**
932
+ * optional string updated_at = 12;
933
+ * @return {string}
934
+ */
935
+ proto.Material.prototype.getUpdatedAt = function() {
936
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
937
+ };
938
+
939
+
940
+ /**
941
+ * @param {string} value
942
+ * @return {!proto.Material} returns this
943
+ */
944
+ proto.Material.prototype.setUpdatedAt = function(value) {
945
+ return jspb.Message.setProto3StringField(this, 12, value);
946
+ };
947
+
948
+
949
+ /**
950
+ * optional int64 base_unit_of_measure_ref = 13;
951
+ * @return {number}
952
+ */
953
+ proto.Material.prototype.getBaseUnitOfMeasureRef = function() {
954
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
955
+ };
956
+
957
+
958
+ /**
959
+ * @param {number} value
960
+ * @return {!proto.Material} returns this
961
+ */
962
+ proto.Material.prototype.setBaseUnitOfMeasureRef = function(value) {
963
+ return jspb.Message.setProto3IntField(this, 13, value);
964
+ };
965
+
966
+
967
+ /**
968
+ * optional UnitOfMeasure base_unit_of_measure = 14;
969
+ * @return {?proto.UnitOfMeasure}
970
+ */
971
+ proto.Material.prototype.getBaseUnitOfMeasure = function() {
972
+ return /** @type{?proto.UnitOfMeasure} */ (
973
+ jspb.Message.getWrapperField(this, prisca_v1_core_unit_of_measurement_unit_of_measurement_pb.UnitOfMeasure, 14));
974
+ };
975
+
976
+
977
+ /**
978
+ * @param {?proto.UnitOfMeasure|undefined} value
979
+ * @return {!proto.Material} returns this
980
+ */
981
+ proto.Material.prototype.setBaseUnitOfMeasure = function(value) {
982
+ return jspb.Message.setWrapperField(this, 14, value);
983
+ };
984
+
985
+
986
+ /**
987
+ * Clears the message field making it undefined.
988
+ * @return {!proto.Material} returns this
989
+ */
990
+ proto.Material.prototype.clearBaseUnitOfMeasure = function() {
991
+ return this.setBaseUnitOfMeasure(undefined);
992
+ };
993
+
994
+
995
+ /**
996
+ * Returns whether this field is set.
997
+ * @return {boolean}
998
+ */
999
+ proto.Material.prototype.hasBaseUnitOfMeasure = function() {
1000
+ return jspb.Message.getField(this, 14) != null;
1001
+ };
1002
+
1003
+
1004
+ /**
1005
+ * repeated MaterialUOM unit_of_measure = 15;
1006
+ * @return {!Array<!proto.MaterialUOM>}
1007
+ */
1008
+ proto.Material.prototype.getUnitOfMeasureList = function() {
1009
+ return /** @type{!Array<!proto.MaterialUOM>} */ (
1010
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialUOM, 15));
1011
+ };
1012
+
1013
+
1014
+ /**
1015
+ * @param {!Array<!proto.MaterialUOM>} value
1016
+ * @return {!proto.Material} returns this
1017
+ */
1018
+ proto.Material.prototype.setUnitOfMeasureList = function(value) {
1019
+ return jspb.Message.setRepeatedWrapperField(this, 15, value);
1020
+ };
1021
+
1022
+
1023
+ /**
1024
+ * @param {!proto.MaterialUOM=} opt_value
1025
+ * @param {number=} opt_index
1026
+ * @return {!proto.MaterialUOM}
1027
+ */
1028
+ proto.Material.prototype.addUnitOfMeasure = function(opt_value, opt_index) {
1029
+ return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.MaterialUOM, opt_index);
1030
+ };
1031
+
1032
+
1033
+ /**
1034
+ * Clears the list making it empty but non-null.
1035
+ * @return {!proto.Material} returns this
1036
+ */
1037
+ proto.Material.prototype.clearUnitOfMeasureList = function() {
1038
+ return this.setUnitOfMeasureList([]);
1039
+ };
1040
+
1041
+
1042
+ /**
1043
+ * optional MaterialType material_type = 16;
1044
+ * @return {?proto.MaterialType}
1045
+ */
1046
+ proto.Material.prototype.getMaterialType = function() {
1047
+ return /** @type{?proto.MaterialType} */ (
1048
+ jspb.Message.getWrapperField(this, prisca_v1_core_material_type_material_type_pb.MaterialType, 16));
1049
+ };
1050
+
1051
+
1052
+ /**
1053
+ * @param {?proto.MaterialType|undefined} value
1054
+ * @return {!proto.Material} returns this
1055
+ */
1056
+ proto.Material.prototype.setMaterialType = function(value) {
1057
+ return jspb.Message.setWrapperField(this, 16, value);
1058
+ };
1059
+
1060
+
1061
+ /**
1062
+ * Clears the message field making it undefined.
1063
+ * @return {!proto.Material} returns this
1064
+ */
1065
+ proto.Material.prototype.clearMaterialType = function() {
1066
+ return this.setMaterialType(undefined);
1067
+ };
1068
+
1069
+
1070
+ /**
1071
+ * Returns whether this field is set.
1072
+ * @return {boolean}
1073
+ */
1074
+ proto.Material.prototype.hasMaterialType = function() {
1075
+ return jspb.Message.getField(this, 16) != null;
1076
+ };
1077
+
1078
+
1079
+ /**
1080
+ * optional MaterialGroup material_group = 17;
1081
+ * @return {?proto.MaterialGroup}
1082
+ */
1083
+ proto.Material.prototype.getMaterialGroup = function() {
1084
+ return /** @type{?proto.MaterialGroup} */ (
1085
+ jspb.Message.getWrapperField(this, prisca_v1_core_material_group_material_group_pb.MaterialGroup, 17));
1086
+ };
1087
+
1088
+
1089
+ /**
1090
+ * @param {?proto.MaterialGroup|undefined} value
1091
+ * @return {!proto.Material} returns this
1092
+ */
1093
+ proto.Material.prototype.setMaterialGroup = function(value) {
1094
+ return jspb.Message.setWrapperField(this, 17, value);
1095
+ };
1096
+
1097
+
1098
+ /**
1099
+ * Clears the message field making it undefined.
1100
+ * @return {!proto.Material} returns this
1101
+ */
1102
+ proto.Material.prototype.clearMaterialGroup = function() {
1103
+ return this.setMaterialGroup(undefined);
1104
+ };
1105
+
1106
+
1107
+ /**
1108
+ * Returns whether this field is set.
1109
+ * @return {boolean}
1110
+ */
1111
+ proto.Material.prototype.hasMaterialGroup = function() {
1112
+ return jspb.Message.getField(this, 17) != null;
1113
+ };
1114
+
1115
+
1116
+ /**
1117
+ * optional int64 material_plant_ref = 18;
1118
+ * @return {number}
1119
+ */
1120
+ proto.Material.prototype.getMaterialPlantRef = function() {
1121
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0));
1122
+ };
1123
+
1124
+
1125
+ /**
1126
+ * @param {number} value
1127
+ * @return {!proto.Material} returns this
1128
+ */
1129
+ proto.Material.prototype.setMaterialPlantRef = function(value) {
1130
+ return jspb.Message.setProto3IntField(this, 18, value);
1131
+ };
1132
+
1133
+
1134
+ /**
1135
+ * optional WorkLocations material_plant = 19;
1136
+ * @return {?proto.WorkLocations}
1137
+ */
1138
+ proto.Material.prototype.getMaterialPlant = function() {
1139
+ return /** @type{?proto.WorkLocations} */ (
1140
+ jspb.Message.getWrapperField(this, prisca_v1_core_work_locations_work_locations_pb.WorkLocations, 19));
1141
+ };
1142
+
1143
+
1144
+ /**
1145
+ * @param {?proto.WorkLocations|undefined} value
1146
+ * @return {!proto.Material} returns this
1147
+ */
1148
+ proto.Material.prototype.setMaterialPlant = function(value) {
1149
+ return jspb.Message.setWrapperField(this, 19, value);
1150
+ };
1151
+
1152
+
1153
+ /**
1154
+ * Clears the message field making it undefined.
1155
+ * @return {!proto.Material} returns this
1156
+ */
1157
+ proto.Material.prototype.clearMaterialPlant = function() {
1158
+ return this.setMaterialPlant(undefined);
1159
+ };
1160
+
1161
+
1162
+ /**
1163
+ * Returns whether this field is set.
1164
+ * @return {boolean}
1165
+ */
1166
+ proto.Material.prototype.hasMaterialPlant = function() {
1167
+ return jspb.Message.getField(this, 19) != null;
1168
+ };
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1175
+ /**
1176
+ * Creates an object representation of this proto.
1177
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1178
+ * Optional fields that are not set will be set to undefined.
1179
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1180
+ * For the list of reserved names please see:
1181
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1182
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1183
+ * JSPB instance for transitional soy proto support:
1184
+ * http://goto/soy-param-migration
1185
+ * @return {!Object}
1186
+ */
1187
+ proto.MaterialLanguageDescription.prototype.toObject = function(opt_includeInstance) {
1188
+ return proto.MaterialLanguageDescription.toObject(opt_includeInstance, this);
1189
+ };
1190
+
1191
+
1192
+ /**
1193
+ * Static version of the {@see toObject} method.
1194
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1195
+ * the JSPB instance for transitional soy proto support:
1196
+ * http://goto/soy-param-migration
1197
+ * @param {!proto.MaterialLanguageDescription} msg The msg instance to transform.
1198
+ * @return {!Object}
1199
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1200
+ */
1201
+ proto.MaterialLanguageDescription.toObject = function(includeInstance, msg) {
1202
+ var f, obj = {
1203
+ language: jspb.Message.getFieldWithDefault(msg, 1, ""),
1204
+ title: jspb.Message.getFieldWithDefault(msg, 2, "")
1205
+ };
1206
+
1207
+ if (includeInstance) {
1208
+ obj.$jspbMessageInstance = msg;
1209
+ }
1210
+ return obj;
1211
+ };
1212
+ }
1213
+
1214
+
1215
+ /**
1216
+ * Deserializes binary data (in protobuf wire format).
1217
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1218
+ * @return {!proto.MaterialLanguageDescription}
1219
+ */
1220
+ proto.MaterialLanguageDescription.deserializeBinary = function(bytes) {
1221
+ var reader = new jspb.BinaryReader(bytes);
1222
+ var msg = new proto.MaterialLanguageDescription;
1223
+ return proto.MaterialLanguageDescription.deserializeBinaryFromReader(msg, reader);
1224
+ };
1225
+
1226
+
1227
+ /**
1228
+ * Deserializes binary data (in protobuf wire format) from the
1229
+ * given reader into the given message object.
1230
+ * @param {!proto.MaterialLanguageDescription} msg The message object to deserialize into.
1231
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1232
+ * @return {!proto.MaterialLanguageDescription}
1233
+ */
1234
+ proto.MaterialLanguageDescription.deserializeBinaryFromReader = function(msg, reader) {
1235
+ while (reader.nextField()) {
1236
+ if (reader.isEndGroup()) {
1237
+ break;
1238
+ }
1239
+ var field = reader.getFieldNumber();
1240
+ switch (field) {
1241
+ case 1:
1242
+ var value = /** @type {string} */ (reader.readString());
1243
+ msg.setLanguage(value);
1244
+ break;
1245
+ case 2:
1246
+ var value = /** @type {string} */ (reader.readString());
1247
+ msg.setTitle(value);
1248
+ break;
1249
+ default:
1250
+ reader.skipField();
1251
+ break;
1252
+ }
1253
+ }
1254
+ return msg;
1255
+ };
1256
+
1257
+
1258
+ /**
1259
+ * Serializes the message to binary data (in protobuf wire format).
1260
+ * @return {!Uint8Array}
1261
+ */
1262
+ proto.MaterialLanguageDescription.prototype.serializeBinary = function() {
1263
+ var writer = new jspb.BinaryWriter();
1264
+ proto.MaterialLanguageDescription.serializeBinaryToWriter(this, writer);
1265
+ return writer.getResultBuffer();
1266
+ };
1267
+
1268
+
1269
+ /**
1270
+ * Serializes the given message to binary data (in protobuf wire
1271
+ * format), writing to the given BinaryWriter.
1272
+ * @param {!proto.MaterialLanguageDescription} message
1273
+ * @param {!jspb.BinaryWriter} writer
1274
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1275
+ */
1276
+ proto.MaterialLanguageDescription.serializeBinaryToWriter = function(message, writer) {
1277
+ var f = undefined;
1278
+ f = message.getLanguage();
1279
+ if (f.length > 0) {
1280
+ writer.writeString(
1281
+ 1,
1282
+ f
1283
+ );
1284
+ }
1285
+ f = message.getTitle();
1286
+ if (f.length > 0) {
1287
+ writer.writeString(
1288
+ 2,
1289
+ f
1290
+ );
1291
+ }
1292
+ };
1293
+
1294
+
1295
+ /**
1296
+ * optional string language = 1;
1297
+ * @return {string}
1298
+ */
1299
+ proto.MaterialLanguageDescription.prototype.getLanguage = function() {
1300
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1301
+ };
1302
+
1303
+
1304
+ /**
1305
+ * @param {string} value
1306
+ * @return {!proto.MaterialLanguageDescription} returns this
1307
+ */
1308
+ proto.MaterialLanguageDescription.prototype.setLanguage = function(value) {
1309
+ return jspb.Message.setProto3StringField(this, 1, value);
1310
+ };
1311
+
1312
+
1313
+ /**
1314
+ * optional string title = 2;
1315
+ * @return {string}
1316
+ */
1317
+ proto.MaterialLanguageDescription.prototype.getTitle = function() {
1318
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1319
+ };
1320
+
1321
+
1322
+ /**
1323
+ * @param {string} value
1324
+ * @return {!proto.MaterialLanguageDescription} returns this
1325
+ */
1326
+ proto.MaterialLanguageDescription.prototype.setTitle = function(value) {
1327
+ return jspb.Message.setProto3StringField(this, 2, value);
1328
+ };
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1335
+ /**
1336
+ * Creates an object representation of this proto.
1337
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1338
+ * Optional fields that are not set will be set to undefined.
1339
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1340
+ * For the list of reserved names please see:
1341
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1342
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1343
+ * JSPB instance for transitional soy proto support:
1344
+ * http://goto/soy-param-migration
1345
+ * @return {!Object}
1346
+ */
1347
+ proto.MaterialUOM.prototype.toObject = function(opt_includeInstance) {
1348
+ return proto.MaterialUOM.toObject(opt_includeInstance, this);
1349
+ };
1350
+
1351
+
1352
+ /**
1353
+ * Static version of the {@see toObject} method.
1354
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1355
+ * the JSPB instance for transitional soy proto support:
1356
+ * http://goto/soy-param-migration
1357
+ * @param {!proto.MaterialUOM} msg The msg instance to transform.
1358
+ * @return {!Object}
1359
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1360
+ */
1361
+ proto.MaterialUOM.toObject = function(includeInstance, msg) {
1362
+ var f, obj = {
1363
+ materialId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1364
+ uomId: jspb.Message.getFieldWithDefault(msg, 2, 0),
1365
+ unitConversion: jspb.Message.getFieldWithDefault(msg, 3, ""),
1366
+ unit: jspb.Message.getFieldWithDefault(msg, 4, "")
1367
+ };
1368
+
1369
+ if (includeInstance) {
1370
+ obj.$jspbMessageInstance = msg;
1371
+ }
1372
+ return obj;
1373
+ };
1374
+ }
1375
+
1376
+
1377
+ /**
1378
+ * Deserializes binary data (in protobuf wire format).
1379
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1380
+ * @return {!proto.MaterialUOM}
1381
+ */
1382
+ proto.MaterialUOM.deserializeBinary = function(bytes) {
1383
+ var reader = new jspb.BinaryReader(bytes);
1384
+ var msg = new proto.MaterialUOM;
1385
+ return proto.MaterialUOM.deserializeBinaryFromReader(msg, reader);
1386
+ };
1387
+
1388
+
1389
+ /**
1390
+ * Deserializes binary data (in protobuf wire format) from the
1391
+ * given reader into the given message object.
1392
+ * @param {!proto.MaterialUOM} msg The message object to deserialize into.
1393
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1394
+ * @return {!proto.MaterialUOM}
1395
+ */
1396
+ proto.MaterialUOM.deserializeBinaryFromReader = function(msg, reader) {
1397
+ while (reader.nextField()) {
1398
+ if (reader.isEndGroup()) {
1399
+ break;
1400
+ }
1401
+ var field = reader.getFieldNumber();
1402
+ switch (field) {
1403
+ case 1:
1404
+ var value = /** @type {number} */ (reader.readInt64());
1405
+ msg.setMaterialId(value);
1406
+ break;
1407
+ case 2:
1408
+ var value = /** @type {number} */ (reader.readInt64());
1409
+ msg.setUomId(value);
1410
+ break;
1411
+ case 3:
1412
+ var value = /** @type {string} */ (reader.readString());
1413
+ msg.setUnitConversion(value);
1414
+ break;
1415
+ case 4:
1416
+ var value = /** @type {string} */ (reader.readString());
1417
+ msg.setUnit(value);
1418
+ break;
1419
+ default:
1420
+ reader.skipField();
1421
+ break;
1422
+ }
1423
+ }
1424
+ return msg;
1425
+ };
1426
+
1427
+
1428
+ /**
1429
+ * Serializes the message to binary data (in protobuf wire format).
1430
+ * @return {!Uint8Array}
1431
+ */
1432
+ proto.MaterialUOM.prototype.serializeBinary = function() {
1433
+ var writer = new jspb.BinaryWriter();
1434
+ proto.MaterialUOM.serializeBinaryToWriter(this, writer);
1435
+ return writer.getResultBuffer();
1436
+ };
1437
+
1438
+
1439
+ /**
1440
+ * Serializes the given message to binary data (in protobuf wire
1441
+ * format), writing to the given BinaryWriter.
1442
+ * @param {!proto.MaterialUOM} message
1443
+ * @param {!jspb.BinaryWriter} writer
1444
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1445
+ */
1446
+ proto.MaterialUOM.serializeBinaryToWriter = function(message, writer) {
1447
+ var f = undefined;
1448
+ f = message.getMaterialId();
1449
+ if (f !== 0) {
1450
+ writer.writeInt64(
1451
+ 1,
1452
+ f
1453
+ );
1454
+ }
1455
+ f = message.getUomId();
1456
+ if (f !== 0) {
1457
+ writer.writeInt64(
1458
+ 2,
1459
+ f
1460
+ );
1461
+ }
1462
+ f = message.getUnitConversion();
1463
+ if (f.length > 0) {
1464
+ writer.writeString(
1465
+ 3,
1466
+ f
1467
+ );
1468
+ }
1469
+ f = message.getUnit();
1470
+ if (f.length > 0) {
1471
+ writer.writeString(
1472
+ 4,
1473
+ f
1474
+ );
1475
+ }
1476
+ };
1477
+
1478
+
1479
+ /**
1480
+ * optional int64 material_id = 1;
1481
+ * @return {number}
1482
+ */
1483
+ proto.MaterialUOM.prototype.getMaterialId = function() {
1484
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1485
+ };
1486
+
1487
+
1488
+ /**
1489
+ * @param {number} value
1490
+ * @return {!proto.MaterialUOM} returns this
1491
+ */
1492
+ proto.MaterialUOM.prototype.setMaterialId = function(value) {
1493
+ return jspb.Message.setProto3IntField(this, 1, value);
1494
+ };
1495
+
1496
+
1497
+ /**
1498
+ * optional int64 uom_id = 2;
1499
+ * @return {number}
1500
+ */
1501
+ proto.MaterialUOM.prototype.getUomId = function() {
1502
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1503
+ };
1504
+
1505
+
1506
+ /**
1507
+ * @param {number} value
1508
+ * @return {!proto.MaterialUOM} returns this
1509
+ */
1510
+ proto.MaterialUOM.prototype.setUomId = function(value) {
1511
+ return jspb.Message.setProto3IntField(this, 2, value);
1512
+ };
1513
+
1514
+
1515
+ /**
1516
+ * optional string unit_conversion = 3;
1517
+ * @return {string}
1518
+ */
1519
+ proto.MaterialUOM.prototype.getUnitConversion = function() {
1520
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1521
+ };
1522
+
1523
+
1524
+ /**
1525
+ * @param {string} value
1526
+ * @return {!proto.MaterialUOM} returns this
1527
+ */
1528
+ proto.MaterialUOM.prototype.setUnitConversion = function(value) {
1529
+ return jspb.Message.setProto3StringField(this, 3, value);
1530
+ };
1531
+
1532
+
1533
+ /**
1534
+ * optional string unit = 4;
1535
+ * @return {string}
1536
+ */
1537
+ proto.MaterialUOM.prototype.getUnit = function() {
1538
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1539
+ };
1540
+
1541
+
1542
+ /**
1543
+ * @param {string} value
1544
+ * @return {!proto.MaterialUOM} returns this
1545
+ */
1546
+ proto.MaterialUOM.prototype.setUnit = function(value) {
1547
+ return jspb.Message.setProto3StringField(this, 4, value);
1548
+ };
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1555
+ /**
1556
+ * Creates an object representation of this proto.
1557
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1558
+ * Optional fields that are not set will be set to undefined.
1559
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1560
+ * For the list of reserved names please see:
1561
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1562
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1563
+ * JSPB instance for transitional soy proto support:
1564
+ * http://goto/soy-param-migration
1565
+ * @return {!Object}
1566
+ */
1567
+ proto.MaterialUOMRequest.prototype.toObject = function(opt_includeInstance) {
1568
+ return proto.MaterialUOMRequest.toObject(opt_includeInstance, this);
1569
+ };
1570
+
1571
+
1572
+ /**
1573
+ * Static version of the {@see toObject} method.
1574
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1575
+ * the JSPB instance for transitional soy proto support:
1576
+ * http://goto/soy-param-migration
1577
+ * @param {!proto.MaterialUOMRequest} msg The msg instance to transform.
1578
+ * @return {!Object}
1579
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1580
+ */
1581
+ proto.MaterialUOMRequest.toObject = function(includeInstance, msg) {
1582
+ var f, obj = {
1583
+ uomId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1584
+ unitConversion: jspb.Message.getFieldWithDefault(msg, 2, "")
1585
+ };
1586
+
1587
+ if (includeInstance) {
1588
+ obj.$jspbMessageInstance = msg;
1589
+ }
1590
+ return obj;
1591
+ };
1592
+ }
1593
+
1594
+
1595
+ /**
1596
+ * Deserializes binary data (in protobuf wire format).
1597
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1598
+ * @return {!proto.MaterialUOMRequest}
1599
+ */
1600
+ proto.MaterialUOMRequest.deserializeBinary = function(bytes) {
1601
+ var reader = new jspb.BinaryReader(bytes);
1602
+ var msg = new proto.MaterialUOMRequest;
1603
+ return proto.MaterialUOMRequest.deserializeBinaryFromReader(msg, reader);
1604
+ };
1605
+
1606
+
1607
+ /**
1608
+ * Deserializes binary data (in protobuf wire format) from the
1609
+ * given reader into the given message object.
1610
+ * @param {!proto.MaterialUOMRequest} msg The message object to deserialize into.
1611
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1612
+ * @return {!proto.MaterialUOMRequest}
1613
+ */
1614
+ proto.MaterialUOMRequest.deserializeBinaryFromReader = function(msg, reader) {
1615
+ while (reader.nextField()) {
1616
+ if (reader.isEndGroup()) {
1617
+ break;
1618
+ }
1619
+ var field = reader.getFieldNumber();
1620
+ switch (field) {
1621
+ case 1:
1622
+ var value = /** @type {number} */ (reader.readInt64());
1623
+ msg.setUomId(value);
1624
+ break;
1625
+ case 2:
1626
+ var value = /** @type {string} */ (reader.readString());
1627
+ msg.setUnitConversion(value);
1628
+ break;
1629
+ default:
1630
+ reader.skipField();
1631
+ break;
1632
+ }
1633
+ }
1634
+ return msg;
1635
+ };
1636
+
1637
+
1638
+ /**
1639
+ * Serializes the message to binary data (in protobuf wire format).
1640
+ * @return {!Uint8Array}
1641
+ */
1642
+ proto.MaterialUOMRequest.prototype.serializeBinary = function() {
1643
+ var writer = new jspb.BinaryWriter();
1644
+ proto.MaterialUOMRequest.serializeBinaryToWriter(this, writer);
1645
+ return writer.getResultBuffer();
1646
+ };
1647
+
1648
+
1649
+ /**
1650
+ * Serializes the given message to binary data (in protobuf wire
1651
+ * format), writing to the given BinaryWriter.
1652
+ * @param {!proto.MaterialUOMRequest} message
1653
+ * @param {!jspb.BinaryWriter} writer
1654
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1655
+ */
1656
+ proto.MaterialUOMRequest.serializeBinaryToWriter = function(message, writer) {
1657
+ var f = undefined;
1658
+ f = message.getUomId();
1659
+ if (f !== 0) {
1660
+ writer.writeInt64(
1661
+ 1,
1662
+ f
1663
+ );
1664
+ }
1665
+ f = message.getUnitConversion();
1666
+ if (f.length > 0) {
1667
+ writer.writeString(
1668
+ 2,
1669
+ f
1670
+ );
1671
+ }
1672
+ };
1673
+
1674
+
1675
+ /**
1676
+ * optional int64 uom_id = 1;
1677
+ * @return {number}
1678
+ */
1679
+ proto.MaterialUOMRequest.prototype.getUomId = function() {
1680
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1681
+ };
1682
+
1683
+
1684
+ /**
1685
+ * @param {number} value
1686
+ * @return {!proto.MaterialUOMRequest} returns this
1687
+ */
1688
+ proto.MaterialUOMRequest.prototype.setUomId = function(value) {
1689
+ return jspb.Message.setProto3IntField(this, 1, value);
1690
+ };
1691
+
1692
+
1693
+ /**
1694
+ * optional string unit_conversion = 2;
1695
+ * @return {string}
1696
+ */
1697
+ proto.MaterialUOMRequest.prototype.getUnitConversion = function() {
1698
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1699
+ };
1700
+
1701
+
1702
+ /**
1703
+ * @param {string} value
1704
+ * @return {!proto.MaterialUOMRequest} returns this
1705
+ */
1706
+ proto.MaterialUOMRequest.prototype.setUnitConversion = function(value) {
1707
+ return jspb.Message.setProto3StringField(this, 2, value);
1708
+ };
1709
+
1710
+
1711
+
1712
+ /**
1713
+ * List of repeated fields within this message type.
1714
+ * @private {!Array<number>}
1715
+ * @const
1716
+ */
1717
+ proto.BaseMaterialRequest.repeatedFields_ = [7,8];
1718
+
1719
+
1720
+
1721
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1722
+ /**
1723
+ * Creates an object representation of this proto.
1724
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1725
+ * Optional fields that are not set will be set to undefined.
1726
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1727
+ * For the list of reserved names please see:
1728
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1729
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1730
+ * JSPB instance for transitional soy proto support:
1731
+ * http://goto/soy-param-migration
1732
+ * @return {!Object}
1733
+ */
1734
+ proto.BaseMaterialRequest.prototype.toObject = function(opt_includeInstance) {
1735
+ return proto.BaseMaterialRequest.toObject(opt_includeInstance, this);
1736
+ };
1737
+
1738
+
1739
+ /**
1740
+ * Static version of the {@see toObject} method.
1741
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1742
+ * the JSPB instance for transitional soy proto support:
1743
+ * http://goto/soy-param-migration
1744
+ * @param {!proto.BaseMaterialRequest} msg The msg instance to transform.
1745
+ * @return {!Object}
1746
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1747
+ */
1748
+ proto.BaseMaterialRequest.toObject = function(includeInstance, msg) {
1749
+ var f, obj = {
1750
+ materialCode: jspb.Message.getFieldWithDefault(msg, 1, ""),
1751
+ materialTypeCodeRef: jspb.Message.getFieldWithDefault(msg, 2, 0),
1752
+ materialDescription: jspb.Message.getFieldWithDefault(msg, 3, ""),
1753
+ materialCategory: jspb.Message.getFieldWithDefault(msg, 4, ""),
1754
+ oldProductNumber: jspb.Message.getFieldWithDefault(msg, 5, 0),
1755
+ materialGroupRef: jspb.Message.getFieldWithDefault(msg, 6, 0),
1756
+ languageDescriptionList: jspb.Message.toObjectList(msg.getLanguageDescriptionList(),
1757
+ proto.MaterialLanguageDescription.toObject, includeInstance),
1758
+ unitOfMeasureList: jspb.Message.toObjectList(msg.getUnitOfMeasureList(),
1759
+ proto.MaterialUOMRequest.toObject, includeInstance),
1760
+ createdBy: jspb.Message.getFieldWithDefault(msg, 9, ""),
1761
+ updatedBy: jspb.Message.getFieldWithDefault(msg, 10, ""),
1762
+ materialPlantRef: jspb.Message.getFieldWithDefault(msg, 11, 0),
1763
+ baseUnitOfMeasureRef: jspb.Message.getFieldWithDefault(msg, 12, 0)
1764
+ };
1765
+
1766
+ if (includeInstance) {
1767
+ obj.$jspbMessageInstance = msg;
1768
+ }
1769
+ return obj;
1770
+ };
1771
+ }
1772
+
1773
+
1774
+ /**
1775
+ * Deserializes binary data (in protobuf wire format).
1776
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1777
+ * @return {!proto.BaseMaterialRequest}
1778
+ */
1779
+ proto.BaseMaterialRequest.deserializeBinary = function(bytes) {
1780
+ var reader = new jspb.BinaryReader(bytes);
1781
+ var msg = new proto.BaseMaterialRequest;
1782
+ return proto.BaseMaterialRequest.deserializeBinaryFromReader(msg, reader);
1783
+ };
1784
+
1785
+
1786
+ /**
1787
+ * Deserializes binary data (in protobuf wire format) from the
1788
+ * given reader into the given message object.
1789
+ * @param {!proto.BaseMaterialRequest} msg The message object to deserialize into.
1790
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1791
+ * @return {!proto.BaseMaterialRequest}
1792
+ */
1793
+ proto.BaseMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
1794
+ while (reader.nextField()) {
1795
+ if (reader.isEndGroup()) {
1796
+ break;
1797
+ }
1798
+ var field = reader.getFieldNumber();
1799
+ switch (field) {
1800
+ case 1:
1801
+ var value = /** @type {string} */ (reader.readString());
1802
+ msg.setMaterialCode(value);
1803
+ break;
1804
+ case 2:
1805
+ var value = /** @type {number} */ (reader.readInt64());
1806
+ msg.setMaterialTypeCodeRef(value);
1807
+ break;
1808
+ case 3:
1809
+ var value = /** @type {string} */ (reader.readString());
1810
+ msg.setMaterialDescription(value);
1811
+ break;
1812
+ case 4:
1813
+ var value = /** @type {string} */ (reader.readString());
1814
+ msg.setMaterialCategory(value);
1815
+ break;
1816
+ case 5:
1817
+ var value = /** @type {number} */ (reader.readInt64());
1818
+ msg.setOldProductNumber(value);
1819
+ break;
1820
+ case 6:
1821
+ var value = /** @type {number} */ (reader.readInt64());
1822
+ msg.setMaterialGroupRef(value);
1823
+ break;
1824
+ case 7:
1825
+ var value = new proto.MaterialLanguageDescription;
1826
+ reader.readMessage(value,proto.MaterialLanguageDescription.deserializeBinaryFromReader);
1827
+ msg.addLanguageDescription(value);
1828
+ break;
1829
+ case 8:
1830
+ var value = new proto.MaterialUOMRequest;
1831
+ reader.readMessage(value,proto.MaterialUOMRequest.deserializeBinaryFromReader);
1832
+ msg.addUnitOfMeasure(value);
1833
+ break;
1834
+ case 9:
1835
+ var value = /** @type {string} */ (reader.readString());
1836
+ msg.setCreatedBy(value);
1837
+ break;
1838
+ case 10:
1839
+ var value = /** @type {string} */ (reader.readString());
1840
+ msg.setUpdatedBy(value);
1841
+ break;
1842
+ case 11:
1843
+ var value = /** @type {number} */ (reader.readInt64());
1844
+ msg.setMaterialPlantRef(value);
1845
+ break;
1846
+ case 12:
1847
+ var value = /** @type {number} */ (reader.readInt64());
1848
+ msg.setBaseUnitOfMeasureRef(value);
1849
+ break;
1850
+ default:
1851
+ reader.skipField();
1852
+ break;
1853
+ }
1854
+ }
1855
+ return msg;
1856
+ };
1857
+
1858
+
1859
+ /**
1860
+ * Serializes the message to binary data (in protobuf wire format).
1861
+ * @return {!Uint8Array}
1862
+ */
1863
+ proto.BaseMaterialRequest.prototype.serializeBinary = function() {
1864
+ var writer = new jspb.BinaryWriter();
1865
+ proto.BaseMaterialRequest.serializeBinaryToWriter(this, writer);
1866
+ return writer.getResultBuffer();
1867
+ };
1868
+
1869
+
1870
+ /**
1871
+ * Serializes the given message to binary data (in protobuf wire
1872
+ * format), writing to the given BinaryWriter.
1873
+ * @param {!proto.BaseMaterialRequest} message
1874
+ * @param {!jspb.BinaryWriter} writer
1875
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1876
+ */
1877
+ proto.BaseMaterialRequest.serializeBinaryToWriter = function(message, writer) {
1878
+ var f = undefined;
1879
+ f = message.getMaterialCode();
1880
+ if (f.length > 0) {
1881
+ writer.writeString(
1882
+ 1,
1883
+ f
1884
+ );
1885
+ }
1886
+ f = message.getMaterialTypeCodeRef();
1887
+ if (f !== 0) {
1888
+ writer.writeInt64(
1889
+ 2,
1890
+ f
1891
+ );
1892
+ }
1893
+ f = message.getMaterialDescription();
1894
+ if (f.length > 0) {
1895
+ writer.writeString(
1896
+ 3,
1897
+ f
1898
+ );
1899
+ }
1900
+ f = message.getMaterialCategory();
1901
+ if (f.length > 0) {
1902
+ writer.writeString(
1903
+ 4,
1904
+ f
1905
+ );
1906
+ }
1907
+ f = message.getOldProductNumber();
1908
+ if (f !== 0) {
1909
+ writer.writeInt64(
1910
+ 5,
1911
+ f
1912
+ );
1913
+ }
1914
+ f = message.getMaterialGroupRef();
1915
+ if (f !== 0) {
1916
+ writer.writeInt64(
1917
+ 6,
1918
+ f
1919
+ );
1920
+ }
1921
+ f = message.getLanguageDescriptionList();
1922
+ if (f.length > 0) {
1923
+ writer.writeRepeatedMessage(
1924
+ 7,
1925
+ f,
1926
+ proto.MaterialLanguageDescription.serializeBinaryToWriter
1927
+ );
1928
+ }
1929
+ f = message.getUnitOfMeasureList();
1930
+ if (f.length > 0) {
1931
+ writer.writeRepeatedMessage(
1932
+ 8,
1933
+ f,
1934
+ proto.MaterialUOMRequest.serializeBinaryToWriter
1935
+ );
1936
+ }
1937
+ f = message.getCreatedBy();
1938
+ if (f.length > 0) {
1939
+ writer.writeString(
1940
+ 9,
1941
+ f
1942
+ );
1943
+ }
1944
+ f = message.getUpdatedBy();
1945
+ if (f.length > 0) {
1946
+ writer.writeString(
1947
+ 10,
1948
+ f
1949
+ );
1950
+ }
1951
+ f = message.getMaterialPlantRef();
1952
+ if (f !== 0) {
1953
+ writer.writeInt64(
1954
+ 11,
1955
+ f
1956
+ );
1957
+ }
1958
+ f = message.getBaseUnitOfMeasureRef();
1959
+ if (f !== 0) {
1960
+ writer.writeInt64(
1961
+ 12,
1962
+ f
1963
+ );
1964
+ }
1965
+ };
1966
+
1967
+
1968
+ /**
1969
+ * optional string material_code = 1;
1970
+ * @return {string}
1971
+ */
1972
+ proto.BaseMaterialRequest.prototype.getMaterialCode = function() {
1973
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1974
+ };
1975
+
1976
+
1977
+ /**
1978
+ * @param {string} value
1979
+ * @return {!proto.BaseMaterialRequest} returns this
1980
+ */
1981
+ proto.BaseMaterialRequest.prototype.setMaterialCode = function(value) {
1982
+ return jspb.Message.setProto3StringField(this, 1, value);
1983
+ };
1984
+
1985
+
1986
+ /**
1987
+ * optional int64 material_type_code_ref = 2;
1988
+ * @return {number}
1989
+ */
1990
+ proto.BaseMaterialRequest.prototype.getMaterialTypeCodeRef = function() {
1991
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1992
+ };
1993
+
1994
+
1995
+ /**
1996
+ * @param {number} value
1997
+ * @return {!proto.BaseMaterialRequest} returns this
1998
+ */
1999
+ proto.BaseMaterialRequest.prototype.setMaterialTypeCodeRef = function(value) {
2000
+ return jspb.Message.setProto3IntField(this, 2, value);
2001
+ };
2002
+
2003
+
2004
+ /**
2005
+ * optional string material_description = 3;
2006
+ * @return {string}
2007
+ */
2008
+ proto.BaseMaterialRequest.prototype.getMaterialDescription = function() {
2009
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2010
+ };
2011
+
2012
+
2013
+ /**
2014
+ * @param {string} value
2015
+ * @return {!proto.BaseMaterialRequest} returns this
2016
+ */
2017
+ proto.BaseMaterialRequest.prototype.setMaterialDescription = function(value) {
2018
+ return jspb.Message.setProto3StringField(this, 3, value);
2019
+ };
2020
+
2021
+
2022
+ /**
2023
+ * optional string material_category = 4;
2024
+ * @return {string}
2025
+ */
2026
+ proto.BaseMaterialRequest.prototype.getMaterialCategory = function() {
2027
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2028
+ };
2029
+
2030
+
2031
+ /**
2032
+ * @param {string} value
2033
+ * @return {!proto.BaseMaterialRequest} returns this
2034
+ */
2035
+ proto.BaseMaterialRequest.prototype.setMaterialCategory = function(value) {
2036
+ return jspb.Message.setProto3StringField(this, 4, value);
2037
+ };
2038
+
2039
+
2040
+ /**
2041
+ * optional int64 old_product_number = 5;
2042
+ * @return {number}
2043
+ */
2044
+ proto.BaseMaterialRequest.prototype.getOldProductNumber = function() {
2045
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2046
+ };
2047
+
2048
+
2049
+ /**
2050
+ * @param {number} value
2051
+ * @return {!proto.BaseMaterialRequest} returns this
2052
+ */
2053
+ proto.BaseMaterialRequest.prototype.setOldProductNumber = function(value) {
2054
+ return jspb.Message.setProto3IntField(this, 5, value);
2055
+ };
2056
+
2057
+
2058
+ /**
2059
+ * optional int64 material_group_ref = 6;
2060
+ * @return {number}
2061
+ */
2062
+ proto.BaseMaterialRequest.prototype.getMaterialGroupRef = function() {
2063
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2064
+ };
2065
+
2066
+
2067
+ /**
2068
+ * @param {number} value
2069
+ * @return {!proto.BaseMaterialRequest} returns this
2070
+ */
2071
+ proto.BaseMaterialRequest.prototype.setMaterialGroupRef = function(value) {
2072
+ return jspb.Message.setProto3IntField(this, 6, value);
2073
+ };
2074
+
2075
+
2076
+ /**
2077
+ * repeated MaterialLanguageDescription language_description = 7;
2078
+ * @return {!Array<!proto.MaterialLanguageDescription>}
2079
+ */
2080
+ proto.BaseMaterialRequest.prototype.getLanguageDescriptionList = function() {
2081
+ return /** @type{!Array<!proto.MaterialLanguageDescription>} */ (
2082
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialLanguageDescription, 7));
2083
+ };
2084
+
2085
+
2086
+ /**
2087
+ * @param {!Array<!proto.MaterialLanguageDescription>} value
2088
+ * @return {!proto.BaseMaterialRequest} returns this
2089
+ */
2090
+ proto.BaseMaterialRequest.prototype.setLanguageDescriptionList = function(value) {
2091
+ return jspb.Message.setRepeatedWrapperField(this, 7, value);
2092
+ };
2093
+
2094
+
2095
+ /**
2096
+ * @param {!proto.MaterialLanguageDescription=} opt_value
2097
+ * @param {number=} opt_index
2098
+ * @return {!proto.MaterialLanguageDescription}
2099
+ */
2100
+ proto.BaseMaterialRequest.prototype.addLanguageDescription = function(opt_value, opt_index) {
2101
+ return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.MaterialLanguageDescription, opt_index);
2102
+ };
2103
+
2104
+
2105
+ /**
2106
+ * Clears the list making it empty but non-null.
2107
+ * @return {!proto.BaseMaterialRequest} returns this
2108
+ */
2109
+ proto.BaseMaterialRequest.prototype.clearLanguageDescriptionList = function() {
2110
+ return this.setLanguageDescriptionList([]);
2111
+ };
2112
+
2113
+
2114
+ /**
2115
+ * repeated MaterialUOMRequest unit_of_measure = 8;
2116
+ * @return {!Array<!proto.MaterialUOMRequest>}
2117
+ */
2118
+ proto.BaseMaterialRequest.prototype.getUnitOfMeasureList = function() {
2119
+ return /** @type{!Array<!proto.MaterialUOMRequest>} */ (
2120
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialUOMRequest, 8));
2121
+ };
2122
+
2123
+
2124
+ /**
2125
+ * @param {!Array<!proto.MaterialUOMRequest>} value
2126
+ * @return {!proto.BaseMaterialRequest} returns this
2127
+ */
2128
+ proto.BaseMaterialRequest.prototype.setUnitOfMeasureList = function(value) {
2129
+ return jspb.Message.setRepeatedWrapperField(this, 8, value);
2130
+ };
2131
+
2132
+
2133
+ /**
2134
+ * @param {!proto.MaterialUOMRequest=} opt_value
2135
+ * @param {number=} opt_index
2136
+ * @return {!proto.MaterialUOMRequest}
2137
+ */
2138
+ proto.BaseMaterialRequest.prototype.addUnitOfMeasure = function(opt_value, opt_index) {
2139
+ return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.MaterialUOMRequest, opt_index);
2140
+ };
2141
+
2142
+
2143
+ /**
2144
+ * Clears the list making it empty but non-null.
2145
+ * @return {!proto.BaseMaterialRequest} returns this
2146
+ */
2147
+ proto.BaseMaterialRequest.prototype.clearUnitOfMeasureList = function() {
2148
+ return this.setUnitOfMeasureList([]);
2149
+ };
2150
+
2151
+
2152
+ /**
2153
+ * optional string created_by = 9;
2154
+ * @return {string}
2155
+ */
2156
+ proto.BaseMaterialRequest.prototype.getCreatedBy = function() {
2157
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
2158
+ };
2159
+
2160
+
2161
+ /**
2162
+ * @param {string} value
2163
+ * @return {!proto.BaseMaterialRequest} returns this
2164
+ */
2165
+ proto.BaseMaterialRequest.prototype.setCreatedBy = function(value) {
2166
+ return jspb.Message.setProto3StringField(this, 9, value);
2167
+ };
2168
+
2169
+
2170
+ /**
2171
+ * optional string updated_by = 10;
2172
+ * @return {string}
2173
+ */
2174
+ proto.BaseMaterialRequest.prototype.getUpdatedBy = function() {
2175
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
2176
+ };
2177
+
2178
+
2179
+ /**
2180
+ * @param {string} value
2181
+ * @return {!proto.BaseMaterialRequest} returns this
2182
+ */
2183
+ proto.BaseMaterialRequest.prototype.setUpdatedBy = function(value) {
2184
+ return jspb.Message.setProto3StringField(this, 10, value);
2185
+ };
2186
+
2187
+
2188
+ /**
2189
+ * optional int64 material_plant_ref = 11;
2190
+ * @return {number}
2191
+ */
2192
+ proto.BaseMaterialRequest.prototype.getMaterialPlantRef = function() {
2193
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
2194
+ };
2195
+
2196
+
2197
+ /**
2198
+ * @param {number} value
2199
+ * @return {!proto.BaseMaterialRequest} returns this
2200
+ */
2201
+ proto.BaseMaterialRequest.prototype.setMaterialPlantRef = function(value) {
2202
+ return jspb.Message.setProto3IntField(this, 11, value);
2203
+ };
2204
+
2205
+
2206
+ /**
2207
+ * optional int64 base_unit_of_measure_ref = 12;
2208
+ * @return {number}
2209
+ */
2210
+ proto.BaseMaterialRequest.prototype.getBaseUnitOfMeasureRef = function() {
2211
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
2212
+ };
2213
+
2214
+
2215
+ /**
2216
+ * @param {number} value
2217
+ * @return {!proto.BaseMaterialRequest} returns this
2218
+ */
2219
+ proto.BaseMaterialRequest.prototype.setBaseUnitOfMeasureRef = function(value) {
2220
+ return jspb.Message.setProto3IntField(this, 12, value);
2221
+ };
2222
+
2223
+
2224
+
2225
+
2226
+
2227
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2228
+ /**
2229
+ * Creates an object representation of this proto.
2230
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2231
+ * Optional fields that are not set will be set to undefined.
2232
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2233
+ * For the list of reserved names please see:
2234
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2235
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2236
+ * JSPB instance for transitional soy proto support:
2237
+ * http://goto/soy-param-migration
2238
+ * @return {!Object}
2239
+ */
2240
+ proto.CreateMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2241
+ return proto.CreateMaterialRequest.toObject(opt_includeInstance, this);
2242
+ };
2243
+
2244
+
2245
+ /**
2246
+ * Static version of the {@see toObject} method.
2247
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2248
+ * the JSPB instance for transitional soy proto support:
2249
+ * http://goto/soy-param-migration
2250
+ * @param {!proto.CreateMaterialRequest} msg The msg instance to transform.
2251
+ * @return {!Object}
2252
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2253
+ */
2254
+ proto.CreateMaterialRequest.toObject = function(includeInstance, msg) {
2255
+ var f, obj = {
2256
+ baseMaterial: (f = msg.getBaseMaterial()) && proto.BaseMaterialRequest.toObject(includeInstance, f)
2257
+ };
2258
+
2259
+ if (includeInstance) {
2260
+ obj.$jspbMessageInstance = msg;
2261
+ }
2262
+ return obj;
2263
+ };
2264
+ }
2265
+
2266
+
2267
+ /**
2268
+ * Deserializes binary data (in protobuf wire format).
2269
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2270
+ * @return {!proto.CreateMaterialRequest}
2271
+ */
2272
+ proto.CreateMaterialRequest.deserializeBinary = function(bytes) {
2273
+ var reader = new jspb.BinaryReader(bytes);
2274
+ var msg = new proto.CreateMaterialRequest;
2275
+ return proto.CreateMaterialRequest.deserializeBinaryFromReader(msg, reader);
2276
+ };
2277
+
2278
+
2279
+ /**
2280
+ * Deserializes binary data (in protobuf wire format) from the
2281
+ * given reader into the given message object.
2282
+ * @param {!proto.CreateMaterialRequest} msg The message object to deserialize into.
2283
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2284
+ * @return {!proto.CreateMaterialRequest}
2285
+ */
2286
+ proto.CreateMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2287
+ while (reader.nextField()) {
2288
+ if (reader.isEndGroup()) {
2289
+ break;
2290
+ }
2291
+ var field = reader.getFieldNumber();
2292
+ switch (field) {
2293
+ case 1:
2294
+ var value = new proto.BaseMaterialRequest;
2295
+ reader.readMessage(value,proto.BaseMaterialRequest.deserializeBinaryFromReader);
2296
+ msg.setBaseMaterial(value);
2297
+ break;
2298
+ default:
2299
+ reader.skipField();
2300
+ break;
2301
+ }
2302
+ }
2303
+ return msg;
2304
+ };
2305
+
2306
+
2307
+ /**
2308
+ * Serializes the message to binary data (in protobuf wire format).
2309
+ * @return {!Uint8Array}
2310
+ */
2311
+ proto.CreateMaterialRequest.prototype.serializeBinary = function() {
2312
+ var writer = new jspb.BinaryWriter();
2313
+ proto.CreateMaterialRequest.serializeBinaryToWriter(this, writer);
2314
+ return writer.getResultBuffer();
2315
+ };
2316
+
2317
+
2318
+ /**
2319
+ * Serializes the given message to binary data (in protobuf wire
2320
+ * format), writing to the given BinaryWriter.
2321
+ * @param {!proto.CreateMaterialRequest} message
2322
+ * @param {!jspb.BinaryWriter} writer
2323
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2324
+ */
2325
+ proto.CreateMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2326
+ var f = undefined;
2327
+ f = message.getBaseMaterial();
2328
+ if (f != null) {
2329
+ writer.writeMessage(
2330
+ 1,
2331
+ f,
2332
+ proto.BaseMaterialRequest.serializeBinaryToWriter
2333
+ );
2334
+ }
2335
+ };
2336
+
2337
+
2338
+ /**
2339
+ * optional BaseMaterialRequest base_material = 1;
2340
+ * @return {?proto.BaseMaterialRequest}
2341
+ */
2342
+ proto.CreateMaterialRequest.prototype.getBaseMaterial = function() {
2343
+ return /** @type{?proto.BaseMaterialRequest} */ (
2344
+ jspb.Message.getWrapperField(this, proto.BaseMaterialRequest, 1));
2345
+ };
2346
+
2347
+
2348
+ /**
2349
+ * @param {?proto.BaseMaterialRequest|undefined} value
2350
+ * @return {!proto.CreateMaterialRequest} returns this
2351
+ */
2352
+ proto.CreateMaterialRequest.prototype.setBaseMaterial = function(value) {
2353
+ return jspb.Message.setWrapperField(this, 1, value);
2354
+ };
2355
+
2356
+
2357
+ /**
2358
+ * Clears the message field making it undefined.
2359
+ * @return {!proto.CreateMaterialRequest} returns this
2360
+ */
2361
+ proto.CreateMaterialRequest.prototype.clearBaseMaterial = function() {
2362
+ return this.setBaseMaterial(undefined);
2363
+ };
2364
+
2365
+
2366
+ /**
2367
+ * Returns whether this field is set.
2368
+ * @return {boolean}
2369
+ */
2370
+ proto.CreateMaterialRequest.prototype.hasBaseMaterial = function() {
2371
+ return jspb.Message.getField(this, 1) != null;
2372
+ };
2373
+
2374
+
2375
+
2376
+
2377
+
2378
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2379
+ /**
2380
+ * Creates an object representation of this proto.
2381
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2382
+ * Optional fields that are not set will be set to undefined.
2383
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2384
+ * For the list of reserved names please see:
2385
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2386
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2387
+ * JSPB instance for transitional soy proto support:
2388
+ * http://goto/soy-param-migration
2389
+ * @return {!Object}
2390
+ */
2391
+ proto.UpdateMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2392
+ return proto.UpdateMaterialRequest.toObject(opt_includeInstance, this);
2393
+ };
2394
+
2395
+
2396
+ /**
2397
+ * Static version of the {@see toObject} method.
2398
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2399
+ * the JSPB instance for transitional soy proto support:
2400
+ * http://goto/soy-param-migration
2401
+ * @param {!proto.UpdateMaterialRequest} msg The msg instance to transform.
2402
+ * @return {!Object}
2403
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2404
+ */
2405
+ proto.UpdateMaterialRequest.toObject = function(includeInstance, msg) {
2406
+ var f, obj = {
2407
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
2408
+ baseMaterial: (f = msg.getBaseMaterial()) && proto.BaseMaterialRequest.toObject(includeInstance, f)
2409
+ };
2410
+
2411
+ if (includeInstance) {
2412
+ obj.$jspbMessageInstance = msg;
2413
+ }
2414
+ return obj;
2415
+ };
2416
+ }
2417
+
2418
+
2419
+ /**
2420
+ * Deserializes binary data (in protobuf wire format).
2421
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2422
+ * @return {!proto.UpdateMaterialRequest}
2423
+ */
2424
+ proto.UpdateMaterialRequest.deserializeBinary = function(bytes) {
2425
+ var reader = new jspb.BinaryReader(bytes);
2426
+ var msg = new proto.UpdateMaterialRequest;
2427
+ return proto.UpdateMaterialRequest.deserializeBinaryFromReader(msg, reader);
2428
+ };
2429
+
2430
+
2431
+ /**
2432
+ * Deserializes binary data (in protobuf wire format) from the
2433
+ * given reader into the given message object.
2434
+ * @param {!proto.UpdateMaterialRequest} msg The message object to deserialize into.
2435
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2436
+ * @return {!proto.UpdateMaterialRequest}
2437
+ */
2438
+ proto.UpdateMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2439
+ while (reader.nextField()) {
2440
+ if (reader.isEndGroup()) {
2441
+ break;
2442
+ }
2443
+ var field = reader.getFieldNumber();
2444
+ switch (field) {
2445
+ case 1:
2446
+ var value = /** @type {number} */ (reader.readInt64());
2447
+ msg.setId(value);
2448
+ break;
2449
+ case 2:
2450
+ var value = new proto.BaseMaterialRequest;
2451
+ reader.readMessage(value,proto.BaseMaterialRequest.deserializeBinaryFromReader);
2452
+ msg.setBaseMaterial(value);
2453
+ break;
2454
+ default:
2455
+ reader.skipField();
2456
+ break;
2457
+ }
2458
+ }
2459
+ return msg;
2460
+ };
2461
+
2462
+
2463
+ /**
2464
+ * Serializes the message to binary data (in protobuf wire format).
2465
+ * @return {!Uint8Array}
2466
+ */
2467
+ proto.UpdateMaterialRequest.prototype.serializeBinary = function() {
2468
+ var writer = new jspb.BinaryWriter();
2469
+ proto.UpdateMaterialRequest.serializeBinaryToWriter(this, writer);
2470
+ return writer.getResultBuffer();
2471
+ };
2472
+
2473
+
2474
+ /**
2475
+ * Serializes the given message to binary data (in protobuf wire
2476
+ * format), writing to the given BinaryWriter.
2477
+ * @param {!proto.UpdateMaterialRequest} message
2478
+ * @param {!jspb.BinaryWriter} writer
2479
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2480
+ */
2481
+ proto.UpdateMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2482
+ var f = undefined;
2483
+ f = message.getId();
2484
+ if (f !== 0) {
2485
+ writer.writeInt64(
2486
+ 1,
2487
+ f
2488
+ );
2489
+ }
2490
+ f = message.getBaseMaterial();
2491
+ if (f != null) {
2492
+ writer.writeMessage(
2493
+ 2,
2494
+ f,
2495
+ proto.BaseMaterialRequest.serializeBinaryToWriter
2496
+ );
2497
+ }
2498
+ };
2499
+
2500
+
2501
+ /**
2502
+ * optional int64 id = 1;
2503
+ * @return {number}
2504
+ */
2505
+ proto.UpdateMaterialRequest.prototype.getId = function() {
2506
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2507
+ };
2508
+
2509
+
2510
+ /**
2511
+ * @param {number} value
2512
+ * @return {!proto.UpdateMaterialRequest} returns this
2513
+ */
2514
+ proto.UpdateMaterialRequest.prototype.setId = function(value) {
2515
+ return jspb.Message.setProto3IntField(this, 1, value);
2516
+ };
2517
+
2518
+
2519
+ /**
2520
+ * optional BaseMaterialRequest base_material = 2;
2521
+ * @return {?proto.BaseMaterialRequest}
2522
+ */
2523
+ proto.UpdateMaterialRequest.prototype.getBaseMaterial = function() {
2524
+ return /** @type{?proto.BaseMaterialRequest} */ (
2525
+ jspb.Message.getWrapperField(this, proto.BaseMaterialRequest, 2));
2526
+ };
2527
+
2528
+
2529
+ /**
2530
+ * @param {?proto.BaseMaterialRequest|undefined} value
2531
+ * @return {!proto.UpdateMaterialRequest} returns this
2532
+ */
2533
+ proto.UpdateMaterialRequest.prototype.setBaseMaterial = function(value) {
2534
+ return jspb.Message.setWrapperField(this, 2, value);
2535
+ };
2536
+
2537
+
2538
+ /**
2539
+ * Clears the message field making it undefined.
2540
+ * @return {!proto.UpdateMaterialRequest} returns this
2541
+ */
2542
+ proto.UpdateMaterialRequest.prototype.clearBaseMaterial = function() {
2543
+ return this.setBaseMaterial(undefined);
2544
+ };
2545
+
2546
+
2547
+ /**
2548
+ * Returns whether this field is set.
2549
+ * @return {boolean}
2550
+ */
2551
+ proto.UpdateMaterialRequest.prototype.hasBaseMaterial = function() {
2552
+ return jspb.Message.getField(this, 2) != null;
2553
+ };
2554
+
2555
+
2556
+
2557
+
2558
+
2559
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2560
+ /**
2561
+ * Creates an object representation of this proto.
2562
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2563
+ * Optional fields that are not set will be set to undefined.
2564
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2565
+ * For the list of reserved names please see:
2566
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2567
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2568
+ * JSPB instance for transitional soy proto support:
2569
+ * http://goto/soy-param-migration
2570
+ * @return {!Object}
2571
+ */
2572
+ proto.DeleteMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2573
+ return proto.DeleteMaterialRequest.toObject(opt_includeInstance, this);
2574
+ };
2575
+
2576
+
2577
+ /**
2578
+ * Static version of the {@see toObject} method.
2579
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2580
+ * the JSPB instance for transitional soy proto support:
2581
+ * http://goto/soy-param-migration
2582
+ * @param {!proto.DeleteMaterialRequest} msg The msg instance to transform.
2583
+ * @return {!Object}
2584
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2585
+ */
2586
+ proto.DeleteMaterialRequest.toObject = function(includeInstance, msg) {
2587
+ var f, obj = {
2588
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
2589
+ };
2590
+
2591
+ if (includeInstance) {
2592
+ obj.$jspbMessageInstance = msg;
2593
+ }
2594
+ return obj;
2595
+ };
2596
+ }
2597
+
2598
+
2599
+ /**
2600
+ * Deserializes binary data (in protobuf wire format).
2601
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2602
+ * @return {!proto.DeleteMaterialRequest}
2603
+ */
2604
+ proto.DeleteMaterialRequest.deserializeBinary = function(bytes) {
2605
+ var reader = new jspb.BinaryReader(bytes);
2606
+ var msg = new proto.DeleteMaterialRequest;
2607
+ return proto.DeleteMaterialRequest.deserializeBinaryFromReader(msg, reader);
2608
+ };
2609
+
2610
+
2611
+ /**
2612
+ * Deserializes binary data (in protobuf wire format) from the
2613
+ * given reader into the given message object.
2614
+ * @param {!proto.DeleteMaterialRequest} msg The message object to deserialize into.
2615
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2616
+ * @return {!proto.DeleteMaterialRequest}
2617
+ */
2618
+ proto.DeleteMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2619
+ while (reader.nextField()) {
2620
+ if (reader.isEndGroup()) {
2621
+ break;
2622
+ }
2623
+ var field = reader.getFieldNumber();
2624
+ switch (field) {
2625
+ case 1:
2626
+ var value = /** @type {number} */ (reader.readInt64());
2627
+ msg.setId(value);
2628
+ break;
2629
+ default:
2630
+ reader.skipField();
2631
+ break;
2632
+ }
2633
+ }
2634
+ return msg;
2635
+ };
2636
+
2637
+
2638
+ /**
2639
+ * Serializes the message to binary data (in protobuf wire format).
2640
+ * @return {!Uint8Array}
2641
+ */
2642
+ proto.DeleteMaterialRequest.prototype.serializeBinary = function() {
2643
+ var writer = new jspb.BinaryWriter();
2644
+ proto.DeleteMaterialRequest.serializeBinaryToWriter(this, writer);
2645
+ return writer.getResultBuffer();
2646
+ };
2647
+
2648
+
2649
+ /**
2650
+ * Serializes the given message to binary data (in protobuf wire
2651
+ * format), writing to the given BinaryWriter.
2652
+ * @param {!proto.DeleteMaterialRequest} message
2653
+ * @param {!jspb.BinaryWriter} writer
2654
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2655
+ */
2656
+ proto.DeleteMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2657
+ var f = undefined;
2658
+ f = message.getId();
2659
+ if (f !== 0) {
2660
+ writer.writeInt64(
2661
+ 1,
2662
+ f
2663
+ );
2664
+ }
2665
+ };
2666
+
2667
+
2668
+ /**
2669
+ * optional int64 id = 1;
2670
+ * @return {number}
2671
+ */
2672
+ proto.DeleteMaterialRequest.prototype.getId = function() {
2673
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2674
+ };
2675
+
2676
+
2677
+ /**
2678
+ * @param {number} value
2679
+ * @return {!proto.DeleteMaterialRequest} returns this
2680
+ */
2681
+ proto.DeleteMaterialRequest.prototype.setId = function(value) {
2682
+ return jspb.Message.setProto3IntField(this, 1, value);
2683
+ };
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2690
+ /**
2691
+ * Creates an object representation of this proto.
2692
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2693
+ * Optional fields that are not set will be set to undefined.
2694
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2695
+ * For the list of reserved names please see:
2696
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2697
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2698
+ * JSPB instance for transitional soy proto support:
2699
+ * http://goto/soy-param-migration
2700
+ * @return {!Object}
2701
+ */
2702
+ proto.GetMaterialByIdRequest.prototype.toObject = function(opt_includeInstance) {
2703
+ return proto.GetMaterialByIdRequest.toObject(opt_includeInstance, this);
2704
+ };
2705
+
2706
+
2707
+ /**
2708
+ * Static version of the {@see toObject} method.
2709
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2710
+ * the JSPB instance for transitional soy proto support:
2711
+ * http://goto/soy-param-migration
2712
+ * @param {!proto.GetMaterialByIdRequest} msg The msg instance to transform.
2713
+ * @return {!Object}
2714
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2715
+ */
2716
+ proto.GetMaterialByIdRequest.toObject = function(includeInstance, msg) {
2717
+ var f, obj = {
2718
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
2719
+ };
2720
+
2721
+ if (includeInstance) {
2722
+ obj.$jspbMessageInstance = msg;
2723
+ }
2724
+ return obj;
2725
+ };
2726
+ }
2727
+
2728
+
2729
+ /**
2730
+ * Deserializes binary data (in protobuf wire format).
2731
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2732
+ * @return {!proto.GetMaterialByIdRequest}
2733
+ */
2734
+ proto.GetMaterialByIdRequest.deserializeBinary = function(bytes) {
2735
+ var reader = new jspb.BinaryReader(bytes);
2736
+ var msg = new proto.GetMaterialByIdRequest;
2737
+ return proto.GetMaterialByIdRequest.deserializeBinaryFromReader(msg, reader);
2738
+ };
2739
+
2740
+
2741
+ /**
2742
+ * Deserializes binary data (in protobuf wire format) from the
2743
+ * given reader into the given message object.
2744
+ * @param {!proto.GetMaterialByIdRequest} msg The message object to deserialize into.
2745
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2746
+ * @return {!proto.GetMaterialByIdRequest}
2747
+ */
2748
+ proto.GetMaterialByIdRequest.deserializeBinaryFromReader = function(msg, reader) {
2749
+ while (reader.nextField()) {
2750
+ if (reader.isEndGroup()) {
2751
+ break;
2752
+ }
2753
+ var field = reader.getFieldNumber();
2754
+ switch (field) {
2755
+ case 1:
2756
+ var value = /** @type {number} */ (reader.readInt64());
2757
+ msg.setId(value);
2758
+ break;
2759
+ default:
2760
+ reader.skipField();
2761
+ break;
2762
+ }
2763
+ }
2764
+ return msg;
2765
+ };
2766
+
2767
+
2768
+ /**
2769
+ * Serializes the message to binary data (in protobuf wire format).
2770
+ * @return {!Uint8Array}
2771
+ */
2772
+ proto.GetMaterialByIdRequest.prototype.serializeBinary = function() {
2773
+ var writer = new jspb.BinaryWriter();
2774
+ proto.GetMaterialByIdRequest.serializeBinaryToWriter(this, writer);
2775
+ return writer.getResultBuffer();
2776
+ };
2777
+
2778
+
2779
+ /**
2780
+ * Serializes the given message to binary data (in protobuf wire
2781
+ * format), writing to the given BinaryWriter.
2782
+ * @param {!proto.GetMaterialByIdRequest} message
2783
+ * @param {!jspb.BinaryWriter} writer
2784
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2785
+ */
2786
+ proto.GetMaterialByIdRequest.serializeBinaryToWriter = function(message, writer) {
2787
+ var f = undefined;
2788
+ f = message.getId();
2789
+ if (f !== 0) {
2790
+ writer.writeInt64(
2791
+ 1,
2792
+ f
2793
+ );
2794
+ }
2795
+ };
2796
+
2797
+
2798
+ /**
2799
+ * optional int64 id = 1;
2800
+ * @return {number}
2801
+ */
2802
+ proto.GetMaterialByIdRequest.prototype.getId = function() {
2803
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2804
+ };
2805
+
2806
+
2807
+ /**
2808
+ * @param {number} value
2809
+ * @return {!proto.GetMaterialByIdRequest} returns this
2810
+ */
2811
+ proto.GetMaterialByIdRequest.prototype.setId = function(value) {
2812
+ return jspb.Message.setProto3IntField(this, 1, value);
2813
+ };
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2820
+ /**
2821
+ * Creates an object representation of this proto.
2822
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2823
+ * Optional fields that are not set will be set to undefined.
2824
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2825
+ * For the list of reserved names please see:
2826
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2827
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2828
+ * JSPB instance for transitional soy proto support:
2829
+ * http://goto/soy-param-migration
2830
+ * @return {!Object}
2831
+ */
2832
+ proto.GetListMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2833
+ return proto.GetListMaterialRequest.toObject(opt_includeInstance, this);
2834
+ };
2835
+
2836
+
2837
+ /**
2838
+ * Static version of the {@see toObject} method.
2839
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2840
+ * the JSPB instance for transitional soy proto support:
2841
+ * http://goto/soy-param-migration
2842
+ * @param {!proto.GetListMaterialRequest} msg The msg instance to transform.
2843
+ * @return {!Object}
2844
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2845
+ */
2846
+ proto.GetListMaterialRequest.toObject = function(includeInstance, msg) {
2847
+ var f, obj = {
2848
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
2849
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
2850
+ };
2851
+
2852
+ if (includeInstance) {
2853
+ obj.$jspbMessageInstance = msg;
2854
+ }
2855
+ return obj;
2856
+ };
2857
+ }
2858
+
2859
+
2860
+ /**
2861
+ * Deserializes binary data (in protobuf wire format).
2862
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2863
+ * @return {!proto.GetListMaterialRequest}
2864
+ */
2865
+ proto.GetListMaterialRequest.deserializeBinary = function(bytes) {
2866
+ var reader = new jspb.BinaryReader(bytes);
2867
+ var msg = new proto.GetListMaterialRequest;
2868
+ return proto.GetListMaterialRequest.deserializeBinaryFromReader(msg, reader);
2869
+ };
2870
+
2871
+
2872
+ /**
2873
+ * Deserializes binary data (in protobuf wire format) from the
2874
+ * given reader into the given message object.
2875
+ * @param {!proto.GetListMaterialRequest} msg The message object to deserialize into.
2876
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2877
+ * @return {!proto.GetListMaterialRequest}
2878
+ */
2879
+ proto.GetListMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2880
+ while (reader.nextField()) {
2881
+ if (reader.isEndGroup()) {
2882
+ break;
2883
+ }
2884
+ var field = reader.getFieldNumber();
2885
+ switch (field) {
2886
+ case 1:
2887
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
2888
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
2889
+ msg.setPagination(value);
2890
+ break;
2891
+ case 2:
2892
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
2893
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
2894
+ msg.setQuery(value);
2895
+ break;
2896
+ default:
2897
+ reader.skipField();
2898
+ break;
2899
+ }
2900
+ }
2901
+ return msg;
2902
+ };
2903
+
2904
+
2905
+ /**
2906
+ * Serializes the message to binary data (in protobuf wire format).
2907
+ * @return {!Uint8Array}
2908
+ */
2909
+ proto.GetListMaterialRequest.prototype.serializeBinary = function() {
2910
+ var writer = new jspb.BinaryWriter();
2911
+ proto.GetListMaterialRequest.serializeBinaryToWriter(this, writer);
2912
+ return writer.getResultBuffer();
2913
+ };
2914
+
2915
+
2916
+ /**
2917
+ * Serializes the given message to binary data (in protobuf wire
2918
+ * format), writing to the given BinaryWriter.
2919
+ * @param {!proto.GetListMaterialRequest} message
2920
+ * @param {!jspb.BinaryWriter} writer
2921
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2922
+ */
2923
+ proto.GetListMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2924
+ var f = undefined;
2925
+ f = message.getPagination();
2926
+ if (f != null) {
2927
+ writer.writeMessage(
2928
+ 1,
2929
+ f,
2930
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
2931
+ );
2932
+ }
2933
+ f = message.getQuery();
2934
+ if (f != null) {
2935
+ writer.writeMessage(
2936
+ 2,
2937
+ f,
2938
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
2939
+ );
2940
+ }
2941
+ };
2942
+
2943
+
2944
+ /**
2945
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
2946
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
2947
+ */
2948
+ proto.GetListMaterialRequest.prototype.getPagination = function() {
2949
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
2950
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
2951
+ };
2952
+
2953
+
2954
+ /**
2955
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
2956
+ * @return {!proto.GetListMaterialRequest} returns this
2957
+ */
2958
+ proto.GetListMaterialRequest.prototype.setPagination = function(value) {
2959
+ return jspb.Message.setWrapperField(this, 1, value);
2960
+ };
2961
+
2962
+
2963
+ /**
2964
+ * Clears the message field making it undefined.
2965
+ * @return {!proto.GetListMaterialRequest} returns this
2966
+ */
2967
+ proto.GetListMaterialRequest.prototype.clearPagination = function() {
2968
+ return this.setPagination(undefined);
2969
+ };
2970
+
2971
+
2972
+ /**
2973
+ * Returns whether this field is set.
2974
+ * @return {boolean}
2975
+ */
2976
+ proto.GetListMaterialRequest.prototype.hasPagination = function() {
2977
+ return jspb.Message.getField(this, 1) != null;
2978
+ };
2979
+
2980
+
2981
+ /**
2982
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
2983
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
2984
+ */
2985
+ proto.GetListMaterialRequest.prototype.getQuery = function() {
2986
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
2987
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
2988
+ };
2989
+
2990
+
2991
+ /**
2992
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
2993
+ * @return {!proto.GetListMaterialRequest} returns this
2994
+ */
2995
+ proto.GetListMaterialRequest.prototype.setQuery = function(value) {
2996
+ return jspb.Message.setWrapperField(this, 2, value);
2997
+ };
2998
+
2999
+
3000
+ /**
3001
+ * Clears the message field making it undefined.
3002
+ * @return {!proto.GetListMaterialRequest} returns this
3003
+ */
3004
+ proto.GetListMaterialRequest.prototype.clearQuery = function() {
3005
+ return this.setQuery(undefined);
3006
+ };
3007
+
3008
+
3009
+ /**
3010
+ * Returns whether this field is set.
3011
+ * @return {boolean}
3012
+ */
3013
+ proto.GetListMaterialRequest.prototype.hasQuery = function() {
3014
+ return jspb.Message.getField(this, 2) != null;
3015
+ };
3016
+
3017
+
3018
+
3019
+
3020
+
3021
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3022
+ /**
3023
+ * Creates an object representation of this proto.
3024
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3025
+ * Optional fields that are not set will be set to undefined.
3026
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3027
+ * For the list of reserved names please see:
3028
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3029
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3030
+ * JSPB instance for transitional soy proto support:
3031
+ * http://goto/soy-param-migration
3032
+ * @return {!Object}
3033
+ */
3034
+ proto.CreateMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3035
+ return proto.CreateMaterialResponse.toObject(opt_includeInstance, this);
3036
+ };
3037
+
3038
+
3039
+ /**
3040
+ * Static version of the {@see toObject} method.
3041
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3042
+ * the JSPB instance for transitional soy proto support:
3043
+ * http://goto/soy-param-migration
3044
+ * @param {!proto.CreateMaterialResponse} msg The msg instance to transform.
3045
+ * @return {!Object}
3046
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3047
+ */
3048
+ proto.CreateMaterialResponse.toObject = function(includeInstance, msg) {
3049
+ var f, obj = {
3050
+ material: (f = msg.getMaterial()) && proto.Material.toObject(includeInstance, f),
3051
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3052
+ };
3053
+
3054
+ if (includeInstance) {
3055
+ obj.$jspbMessageInstance = msg;
3056
+ }
3057
+ return obj;
3058
+ };
3059
+ }
3060
+
3061
+
3062
+ /**
3063
+ * Deserializes binary data (in protobuf wire format).
3064
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3065
+ * @return {!proto.CreateMaterialResponse}
3066
+ */
3067
+ proto.CreateMaterialResponse.deserializeBinary = function(bytes) {
3068
+ var reader = new jspb.BinaryReader(bytes);
3069
+ var msg = new proto.CreateMaterialResponse;
3070
+ return proto.CreateMaterialResponse.deserializeBinaryFromReader(msg, reader);
3071
+ };
3072
+
3073
+
3074
+ /**
3075
+ * Deserializes binary data (in protobuf wire format) from the
3076
+ * given reader into the given message object.
3077
+ * @param {!proto.CreateMaterialResponse} msg The message object to deserialize into.
3078
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3079
+ * @return {!proto.CreateMaterialResponse}
3080
+ */
3081
+ proto.CreateMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3082
+ while (reader.nextField()) {
3083
+ if (reader.isEndGroup()) {
3084
+ break;
3085
+ }
3086
+ var field = reader.getFieldNumber();
3087
+ switch (field) {
3088
+ case 1:
3089
+ var value = new proto.Material;
3090
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3091
+ msg.setMaterial(value);
3092
+ break;
3093
+ case 2:
3094
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3095
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3096
+ msg.setMeta(value);
3097
+ break;
3098
+ default:
3099
+ reader.skipField();
3100
+ break;
3101
+ }
3102
+ }
3103
+ return msg;
3104
+ };
3105
+
3106
+
3107
+ /**
3108
+ * Serializes the message to binary data (in protobuf wire format).
3109
+ * @return {!Uint8Array}
3110
+ */
3111
+ proto.CreateMaterialResponse.prototype.serializeBinary = function() {
3112
+ var writer = new jspb.BinaryWriter();
3113
+ proto.CreateMaterialResponse.serializeBinaryToWriter(this, writer);
3114
+ return writer.getResultBuffer();
3115
+ };
3116
+
3117
+
3118
+ /**
3119
+ * Serializes the given message to binary data (in protobuf wire
3120
+ * format), writing to the given BinaryWriter.
3121
+ * @param {!proto.CreateMaterialResponse} message
3122
+ * @param {!jspb.BinaryWriter} writer
3123
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3124
+ */
3125
+ proto.CreateMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3126
+ var f = undefined;
3127
+ f = message.getMaterial();
3128
+ if (f != null) {
3129
+ writer.writeMessage(
3130
+ 1,
3131
+ f,
3132
+ proto.Material.serializeBinaryToWriter
3133
+ );
3134
+ }
3135
+ f = message.getMeta();
3136
+ if (f != null) {
3137
+ writer.writeMessage(
3138
+ 2,
3139
+ f,
3140
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3141
+ );
3142
+ }
3143
+ };
3144
+
3145
+
3146
+ /**
3147
+ * optional Material material = 1;
3148
+ * @return {?proto.Material}
3149
+ */
3150
+ proto.CreateMaterialResponse.prototype.getMaterial = function() {
3151
+ return /** @type{?proto.Material} */ (
3152
+ jspb.Message.getWrapperField(this, proto.Material, 1));
3153
+ };
3154
+
3155
+
3156
+ /**
3157
+ * @param {?proto.Material|undefined} value
3158
+ * @return {!proto.CreateMaterialResponse} returns this
3159
+ */
3160
+ proto.CreateMaterialResponse.prototype.setMaterial = function(value) {
3161
+ return jspb.Message.setWrapperField(this, 1, value);
3162
+ };
3163
+
3164
+
3165
+ /**
3166
+ * Clears the message field making it undefined.
3167
+ * @return {!proto.CreateMaterialResponse} returns this
3168
+ */
3169
+ proto.CreateMaterialResponse.prototype.clearMaterial = function() {
3170
+ return this.setMaterial(undefined);
3171
+ };
3172
+
3173
+
3174
+ /**
3175
+ * Returns whether this field is set.
3176
+ * @return {boolean}
3177
+ */
3178
+ proto.CreateMaterialResponse.prototype.hasMaterial = function() {
3179
+ return jspb.Message.getField(this, 1) != null;
3180
+ };
3181
+
3182
+
3183
+ /**
3184
+ * optional prisca.v1.global.meta.Meta meta = 2;
3185
+ * @return {?proto.prisca.v1.global.meta.Meta}
3186
+ */
3187
+ proto.CreateMaterialResponse.prototype.getMeta = function() {
3188
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3189
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3190
+ };
3191
+
3192
+
3193
+ /**
3194
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3195
+ * @return {!proto.CreateMaterialResponse} returns this
3196
+ */
3197
+ proto.CreateMaterialResponse.prototype.setMeta = function(value) {
3198
+ return jspb.Message.setWrapperField(this, 2, value);
3199
+ };
3200
+
3201
+
3202
+ /**
3203
+ * Clears the message field making it undefined.
3204
+ * @return {!proto.CreateMaterialResponse} returns this
3205
+ */
3206
+ proto.CreateMaterialResponse.prototype.clearMeta = function() {
3207
+ return this.setMeta(undefined);
3208
+ };
3209
+
3210
+
3211
+ /**
3212
+ * Returns whether this field is set.
3213
+ * @return {boolean}
3214
+ */
3215
+ proto.CreateMaterialResponse.prototype.hasMeta = function() {
3216
+ return jspb.Message.getField(this, 2) != null;
3217
+ };
3218
+
3219
+
3220
+
3221
+
3222
+
3223
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3224
+ /**
3225
+ * Creates an object representation of this proto.
3226
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3227
+ * Optional fields that are not set will be set to undefined.
3228
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3229
+ * For the list of reserved names please see:
3230
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3231
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3232
+ * JSPB instance for transitional soy proto support:
3233
+ * http://goto/soy-param-migration
3234
+ * @return {!Object}
3235
+ */
3236
+ proto.UpdateMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3237
+ return proto.UpdateMaterialResponse.toObject(opt_includeInstance, this);
3238
+ };
3239
+
3240
+
3241
+ /**
3242
+ * Static version of the {@see toObject} method.
3243
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3244
+ * the JSPB instance for transitional soy proto support:
3245
+ * http://goto/soy-param-migration
3246
+ * @param {!proto.UpdateMaterialResponse} msg The msg instance to transform.
3247
+ * @return {!Object}
3248
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3249
+ */
3250
+ proto.UpdateMaterialResponse.toObject = function(includeInstance, msg) {
3251
+ var f, obj = {
3252
+ material: (f = msg.getMaterial()) && proto.Material.toObject(includeInstance, f),
3253
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3254
+ };
3255
+
3256
+ if (includeInstance) {
3257
+ obj.$jspbMessageInstance = msg;
3258
+ }
3259
+ return obj;
3260
+ };
3261
+ }
3262
+
3263
+
3264
+ /**
3265
+ * Deserializes binary data (in protobuf wire format).
3266
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3267
+ * @return {!proto.UpdateMaterialResponse}
3268
+ */
3269
+ proto.UpdateMaterialResponse.deserializeBinary = function(bytes) {
3270
+ var reader = new jspb.BinaryReader(bytes);
3271
+ var msg = new proto.UpdateMaterialResponse;
3272
+ return proto.UpdateMaterialResponse.deserializeBinaryFromReader(msg, reader);
3273
+ };
3274
+
3275
+
3276
+ /**
3277
+ * Deserializes binary data (in protobuf wire format) from the
3278
+ * given reader into the given message object.
3279
+ * @param {!proto.UpdateMaterialResponse} msg The message object to deserialize into.
3280
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3281
+ * @return {!proto.UpdateMaterialResponse}
3282
+ */
3283
+ proto.UpdateMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3284
+ while (reader.nextField()) {
3285
+ if (reader.isEndGroup()) {
3286
+ break;
3287
+ }
3288
+ var field = reader.getFieldNumber();
3289
+ switch (field) {
3290
+ case 1:
3291
+ var value = new proto.Material;
3292
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3293
+ msg.setMaterial(value);
3294
+ break;
3295
+ case 2:
3296
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3297
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3298
+ msg.setMeta(value);
3299
+ break;
3300
+ default:
3301
+ reader.skipField();
3302
+ break;
3303
+ }
3304
+ }
3305
+ return msg;
3306
+ };
3307
+
3308
+
3309
+ /**
3310
+ * Serializes the message to binary data (in protobuf wire format).
3311
+ * @return {!Uint8Array}
3312
+ */
3313
+ proto.UpdateMaterialResponse.prototype.serializeBinary = function() {
3314
+ var writer = new jspb.BinaryWriter();
3315
+ proto.UpdateMaterialResponse.serializeBinaryToWriter(this, writer);
3316
+ return writer.getResultBuffer();
3317
+ };
3318
+
3319
+
3320
+ /**
3321
+ * Serializes the given message to binary data (in protobuf wire
3322
+ * format), writing to the given BinaryWriter.
3323
+ * @param {!proto.UpdateMaterialResponse} message
3324
+ * @param {!jspb.BinaryWriter} writer
3325
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3326
+ */
3327
+ proto.UpdateMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3328
+ var f = undefined;
3329
+ f = message.getMaterial();
3330
+ if (f != null) {
3331
+ writer.writeMessage(
3332
+ 1,
3333
+ f,
3334
+ proto.Material.serializeBinaryToWriter
3335
+ );
3336
+ }
3337
+ f = message.getMeta();
3338
+ if (f != null) {
3339
+ writer.writeMessage(
3340
+ 2,
3341
+ f,
3342
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3343
+ );
3344
+ }
3345
+ };
3346
+
3347
+
3348
+ /**
3349
+ * optional Material material = 1;
3350
+ * @return {?proto.Material}
3351
+ */
3352
+ proto.UpdateMaterialResponse.prototype.getMaterial = function() {
3353
+ return /** @type{?proto.Material} */ (
3354
+ jspb.Message.getWrapperField(this, proto.Material, 1));
3355
+ };
3356
+
3357
+
3358
+ /**
3359
+ * @param {?proto.Material|undefined} value
3360
+ * @return {!proto.UpdateMaterialResponse} returns this
3361
+ */
3362
+ proto.UpdateMaterialResponse.prototype.setMaterial = function(value) {
3363
+ return jspb.Message.setWrapperField(this, 1, value);
3364
+ };
3365
+
3366
+
3367
+ /**
3368
+ * Clears the message field making it undefined.
3369
+ * @return {!proto.UpdateMaterialResponse} returns this
3370
+ */
3371
+ proto.UpdateMaterialResponse.prototype.clearMaterial = function() {
3372
+ return this.setMaterial(undefined);
3373
+ };
3374
+
3375
+
3376
+ /**
3377
+ * Returns whether this field is set.
3378
+ * @return {boolean}
3379
+ */
3380
+ proto.UpdateMaterialResponse.prototype.hasMaterial = function() {
3381
+ return jspb.Message.getField(this, 1) != null;
3382
+ };
3383
+
3384
+
3385
+ /**
3386
+ * optional prisca.v1.global.meta.Meta meta = 2;
3387
+ * @return {?proto.prisca.v1.global.meta.Meta}
3388
+ */
3389
+ proto.UpdateMaterialResponse.prototype.getMeta = function() {
3390
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3391
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3392
+ };
3393
+
3394
+
3395
+ /**
3396
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3397
+ * @return {!proto.UpdateMaterialResponse} returns this
3398
+ */
3399
+ proto.UpdateMaterialResponse.prototype.setMeta = function(value) {
3400
+ return jspb.Message.setWrapperField(this, 2, value);
3401
+ };
3402
+
3403
+
3404
+ /**
3405
+ * Clears the message field making it undefined.
3406
+ * @return {!proto.UpdateMaterialResponse} returns this
3407
+ */
3408
+ proto.UpdateMaterialResponse.prototype.clearMeta = function() {
3409
+ return this.setMeta(undefined);
3410
+ };
3411
+
3412
+
3413
+ /**
3414
+ * Returns whether this field is set.
3415
+ * @return {boolean}
3416
+ */
3417
+ proto.UpdateMaterialResponse.prototype.hasMeta = function() {
3418
+ return jspb.Message.getField(this, 2) != null;
3419
+ };
3420
+
3421
+
3422
+
3423
+
3424
+
3425
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3426
+ /**
3427
+ * Creates an object representation of this proto.
3428
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3429
+ * Optional fields that are not set will be set to undefined.
3430
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3431
+ * For the list of reserved names please see:
3432
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3433
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3434
+ * JSPB instance for transitional soy proto support:
3435
+ * http://goto/soy-param-migration
3436
+ * @return {!Object}
3437
+ */
3438
+ proto.DeleteMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3439
+ return proto.DeleteMaterialResponse.toObject(opt_includeInstance, this);
3440
+ };
3441
+
3442
+
3443
+ /**
3444
+ * Static version of the {@see toObject} method.
3445
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3446
+ * the JSPB instance for transitional soy proto support:
3447
+ * http://goto/soy-param-migration
3448
+ * @param {!proto.DeleteMaterialResponse} msg The msg instance to transform.
3449
+ * @return {!Object}
3450
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3451
+ */
3452
+ proto.DeleteMaterialResponse.toObject = function(includeInstance, msg) {
3453
+ var f, obj = {
3454
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
3455
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3456
+ };
3457
+
3458
+ if (includeInstance) {
3459
+ obj.$jspbMessageInstance = msg;
3460
+ }
3461
+ return obj;
3462
+ };
3463
+ }
3464
+
3465
+
3466
+ /**
3467
+ * Deserializes binary data (in protobuf wire format).
3468
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3469
+ * @return {!proto.DeleteMaterialResponse}
3470
+ */
3471
+ proto.DeleteMaterialResponse.deserializeBinary = function(bytes) {
3472
+ var reader = new jspb.BinaryReader(bytes);
3473
+ var msg = new proto.DeleteMaterialResponse;
3474
+ return proto.DeleteMaterialResponse.deserializeBinaryFromReader(msg, reader);
3475
+ };
3476
+
3477
+
3478
+ /**
3479
+ * Deserializes binary data (in protobuf wire format) from the
3480
+ * given reader into the given message object.
3481
+ * @param {!proto.DeleteMaterialResponse} msg The message object to deserialize into.
3482
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3483
+ * @return {!proto.DeleteMaterialResponse}
3484
+ */
3485
+ proto.DeleteMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3486
+ while (reader.nextField()) {
3487
+ if (reader.isEndGroup()) {
3488
+ break;
3489
+ }
3490
+ var field = reader.getFieldNumber();
3491
+ switch (field) {
3492
+ case 1:
3493
+ var value = /** @type {number} */ (reader.readInt64());
3494
+ msg.setId(value);
3495
+ break;
3496
+ case 2:
3497
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3498
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3499
+ msg.setMeta(value);
3500
+ break;
3501
+ default:
3502
+ reader.skipField();
3503
+ break;
3504
+ }
3505
+ }
3506
+ return msg;
3507
+ };
3508
+
3509
+
3510
+ /**
3511
+ * Serializes the message to binary data (in protobuf wire format).
3512
+ * @return {!Uint8Array}
3513
+ */
3514
+ proto.DeleteMaterialResponse.prototype.serializeBinary = function() {
3515
+ var writer = new jspb.BinaryWriter();
3516
+ proto.DeleteMaterialResponse.serializeBinaryToWriter(this, writer);
3517
+ return writer.getResultBuffer();
3518
+ };
3519
+
3520
+
3521
+ /**
3522
+ * Serializes the given message to binary data (in protobuf wire
3523
+ * format), writing to the given BinaryWriter.
3524
+ * @param {!proto.DeleteMaterialResponse} message
3525
+ * @param {!jspb.BinaryWriter} writer
3526
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3527
+ */
3528
+ proto.DeleteMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3529
+ var f = undefined;
3530
+ f = message.getId();
3531
+ if (f !== 0) {
3532
+ writer.writeInt64(
3533
+ 1,
3534
+ f
3535
+ );
3536
+ }
3537
+ f = message.getMeta();
3538
+ if (f != null) {
3539
+ writer.writeMessage(
3540
+ 2,
3541
+ f,
3542
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3543
+ );
3544
+ }
3545
+ };
3546
+
3547
+
3548
+ /**
3549
+ * optional int64 id = 1;
3550
+ * @return {number}
3551
+ */
3552
+ proto.DeleteMaterialResponse.prototype.getId = function() {
3553
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3554
+ };
3555
+
3556
+
3557
+ /**
3558
+ * @param {number} value
3559
+ * @return {!proto.DeleteMaterialResponse} returns this
3560
+ */
3561
+ proto.DeleteMaterialResponse.prototype.setId = function(value) {
3562
+ return jspb.Message.setProto3IntField(this, 1, value);
3563
+ };
3564
+
3565
+
3566
+ /**
3567
+ * optional prisca.v1.global.meta.Meta meta = 2;
3568
+ * @return {?proto.prisca.v1.global.meta.Meta}
3569
+ */
3570
+ proto.DeleteMaterialResponse.prototype.getMeta = function() {
3571
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3572
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3573
+ };
3574
+
3575
+
3576
+ /**
3577
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3578
+ * @return {!proto.DeleteMaterialResponse} returns this
3579
+ */
3580
+ proto.DeleteMaterialResponse.prototype.setMeta = function(value) {
3581
+ return jspb.Message.setWrapperField(this, 2, value);
3582
+ };
3583
+
3584
+
3585
+ /**
3586
+ * Clears the message field making it undefined.
3587
+ * @return {!proto.DeleteMaterialResponse} returns this
3588
+ */
3589
+ proto.DeleteMaterialResponse.prototype.clearMeta = function() {
3590
+ return this.setMeta(undefined);
3591
+ };
3592
+
3593
+
3594
+ /**
3595
+ * Returns whether this field is set.
3596
+ * @return {boolean}
3597
+ */
3598
+ proto.DeleteMaterialResponse.prototype.hasMeta = function() {
3599
+ return jspb.Message.getField(this, 2) != null;
3600
+ };
3601
+
3602
+
3603
+
3604
+
3605
+
3606
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3607
+ /**
3608
+ * Creates an object representation of this proto.
3609
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3610
+ * Optional fields that are not set will be set to undefined.
3611
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3612
+ * For the list of reserved names please see:
3613
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3614
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3615
+ * JSPB instance for transitional soy proto support:
3616
+ * http://goto/soy-param-migration
3617
+ * @return {!Object}
3618
+ */
3619
+ proto.GetMaterialByIdResponse.prototype.toObject = function(opt_includeInstance) {
3620
+ return proto.GetMaterialByIdResponse.toObject(opt_includeInstance, this);
3621
+ };
3622
+
3623
+
3624
+ /**
3625
+ * Static version of the {@see toObject} method.
3626
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3627
+ * the JSPB instance for transitional soy proto support:
3628
+ * http://goto/soy-param-migration
3629
+ * @param {!proto.GetMaterialByIdResponse} msg The msg instance to transform.
3630
+ * @return {!Object}
3631
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3632
+ */
3633
+ proto.GetMaterialByIdResponse.toObject = function(includeInstance, msg) {
3634
+ var f, obj = {
3635
+ material: (f = msg.getMaterial()) && proto.Material.toObject(includeInstance, f),
3636
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3637
+ };
3638
+
3639
+ if (includeInstance) {
3640
+ obj.$jspbMessageInstance = msg;
3641
+ }
3642
+ return obj;
3643
+ };
3644
+ }
3645
+
3646
+
3647
+ /**
3648
+ * Deserializes binary data (in protobuf wire format).
3649
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3650
+ * @return {!proto.GetMaterialByIdResponse}
3651
+ */
3652
+ proto.GetMaterialByIdResponse.deserializeBinary = function(bytes) {
3653
+ var reader = new jspb.BinaryReader(bytes);
3654
+ var msg = new proto.GetMaterialByIdResponse;
3655
+ return proto.GetMaterialByIdResponse.deserializeBinaryFromReader(msg, reader);
3656
+ };
3657
+
3658
+
3659
+ /**
3660
+ * Deserializes binary data (in protobuf wire format) from the
3661
+ * given reader into the given message object.
3662
+ * @param {!proto.GetMaterialByIdResponse} msg The message object to deserialize into.
3663
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3664
+ * @return {!proto.GetMaterialByIdResponse}
3665
+ */
3666
+ proto.GetMaterialByIdResponse.deserializeBinaryFromReader = function(msg, reader) {
3667
+ while (reader.nextField()) {
3668
+ if (reader.isEndGroup()) {
3669
+ break;
3670
+ }
3671
+ var field = reader.getFieldNumber();
3672
+ switch (field) {
3673
+ case 1:
3674
+ var value = new proto.Material;
3675
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3676
+ msg.setMaterial(value);
3677
+ break;
3678
+ case 2:
3679
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3680
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3681
+ msg.setMeta(value);
3682
+ break;
3683
+ default:
3684
+ reader.skipField();
3685
+ break;
3686
+ }
3687
+ }
3688
+ return msg;
3689
+ };
3690
+
3691
+
3692
+ /**
3693
+ * Serializes the message to binary data (in protobuf wire format).
3694
+ * @return {!Uint8Array}
3695
+ */
3696
+ proto.GetMaterialByIdResponse.prototype.serializeBinary = function() {
3697
+ var writer = new jspb.BinaryWriter();
3698
+ proto.GetMaterialByIdResponse.serializeBinaryToWriter(this, writer);
3699
+ return writer.getResultBuffer();
3700
+ };
3701
+
3702
+
3703
+ /**
3704
+ * Serializes the given message to binary data (in protobuf wire
3705
+ * format), writing to the given BinaryWriter.
3706
+ * @param {!proto.GetMaterialByIdResponse} message
3707
+ * @param {!jspb.BinaryWriter} writer
3708
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3709
+ */
3710
+ proto.GetMaterialByIdResponse.serializeBinaryToWriter = function(message, writer) {
3711
+ var f = undefined;
3712
+ f = message.getMaterial();
3713
+ if (f != null) {
3714
+ writer.writeMessage(
3715
+ 1,
3716
+ f,
3717
+ proto.Material.serializeBinaryToWriter
3718
+ );
3719
+ }
3720
+ f = message.getMeta();
3721
+ if (f != null) {
3722
+ writer.writeMessage(
3723
+ 2,
3724
+ f,
3725
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3726
+ );
3727
+ }
3728
+ };
3729
+
3730
+
3731
+ /**
3732
+ * optional Material material = 1;
3733
+ * @return {?proto.Material}
3734
+ */
3735
+ proto.GetMaterialByIdResponse.prototype.getMaterial = function() {
3736
+ return /** @type{?proto.Material} */ (
3737
+ jspb.Message.getWrapperField(this, proto.Material, 1));
3738
+ };
3739
+
3740
+
3741
+ /**
3742
+ * @param {?proto.Material|undefined} value
3743
+ * @return {!proto.GetMaterialByIdResponse} returns this
3744
+ */
3745
+ proto.GetMaterialByIdResponse.prototype.setMaterial = function(value) {
3746
+ return jspb.Message.setWrapperField(this, 1, value);
3747
+ };
3748
+
3749
+
3750
+ /**
3751
+ * Clears the message field making it undefined.
3752
+ * @return {!proto.GetMaterialByIdResponse} returns this
3753
+ */
3754
+ proto.GetMaterialByIdResponse.prototype.clearMaterial = function() {
3755
+ return this.setMaterial(undefined);
3756
+ };
3757
+
3758
+
3759
+ /**
3760
+ * Returns whether this field is set.
3761
+ * @return {boolean}
3762
+ */
3763
+ proto.GetMaterialByIdResponse.prototype.hasMaterial = function() {
3764
+ return jspb.Message.getField(this, 1) != null;
3765
+ };
3766
+
3767
+
3768
+ /**
3769
+ * optional prisca.v1.global.meta.Meta meta = 2;
3770
+ * @return {?proto.prisca.v1.global.meta.Meta}
3771
+ */
3772
+ proto.GetMaterialByIdResponse.prototype.getMeta = function() {
3773
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3774
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3775
+ };
3776
+
3777
+
3778
+ /**
3779
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3780
+ * @return {!proto.GetMaterialByIdResponse} returns this
3781
+ */
3782
+ proto.GetMaterialByIdResponse.prototype.setMeta = function(value) {
3783
+ return jspb.Message.setWrapperField(this, 2, value);
3784
+ };
3785
+
3786
+
3787
+ /**
3788
+ * Clears the message field making it undefined.
3789
+ * @return {!proto.GetMaterialByIdResponse} returns this
3790
+ */
3791
+ proto.GetMaterialByIdResponse.prototype.clearMeta = function() {
3792
+ return this.setMeta(undefined);
3793
+ };
3794
+
3795
+
3796
+ /**
3797
+ * Returns whether this field is set.
3798
+ * @return {boolean}
3799
+ */
3800
+ proto.GetMaterialByIdResponse.prototype.hasMeta = function() {
3801
+ return jspb.Message.getField(this, 2) != null;
3802
+ };
3803
+
3804
+
3805
+
3806
+ /**
3807
+ * List of repeated fields within this message type.
3808
+ * @private {!Array<number>}
3809
+ * @const
3810
+ */
3811
+ proto.GetListMaterialResponse.repeatedFields_ = [1];
3812
+
3813
+
3814
+
3815
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3816
+ /**
3817
+ * Creates an object representation of this proto.
3818
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3819
+ * Optional fields that are not set will be set to undefined.
3820
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3821
+ * For the list of reserved names please see:
3822
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3823
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3824
+ * JSPB instance for transitional soy proto support:
3825
+ * http://goto/soy-param-migration
3826
+ * @return {!Object}
3827
+ */
3828
+ proto.GetListMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3829
+ return proto.GetListMaterialResponse.toObject(opt_includeInstance, this);
3830
+ };
3831
+
3832
+
3833
+ /**
3834
+ * Static version of the {@see toObject} method.
3835
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3836
+ * the JSPB instance for transitional soy proto support:
3837
+ * http://goto/soy-param-migration
3838
+ * @param {!proto.GetListMaterialResponse} msg The msg instance to transform.
3839
+ * @return {!Object}
3840
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3841
+ */
3842
+ proto.GetListMaterialResponse.toObject = function(includeInstance, msg) {
3843
+ var f, obj = {
3844
+ materialsList: jspb.Message.toObjectList(msg.getMaterialsList(),
3845
+ proto.Material.toObject, includeInstance),
3846
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3847
+ };
3848
+
3849
+ if (includeInstance) {
3850
+ obj.$jspbMessageInstance = msg;
3851
+ }
3852
+ return obj;
3853
+ };
3854
+ }
3855
+
3856
+
3857
+ /**
3858
+ * Deserializes binary data (in protobuf wire format).
3859
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3860
+ * @return {!proto.GetListMaterialResponse}
3861
+ */
3862
+ proto.GetListMaterialResponse.deserializeBinary = function(bytes) {
3863
+ var reader = new jspb.BinaryReader(bytes);
3864
+ var msg = new proto.GetListMaterialResponse;
3865
+ return proto.GetListMaterialResponse.deserializeBinaryFromReader(msg, reader);
3866
+ };
3867
+
3868
+
3869
+ /**
3870
+ * Deserializes binary data (in protobuf wire format) from the
3871
+ * given reader into the given message object.
3872
+ * @param {!proto.GetListMaterialResponse} msg The message object to deserialize into.
3873
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3874
+ * @return {!proto.GetListMaterialResponse}
3875
+ */
3876
+ proto.GetListMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3877
+ while (reader.nextField()) {
3878
+ if (reader.isEndGroup()) {
3879
+ break;
3880
+ }
3881
+ var field = reader.getFieldNumber();
3882
+ switch (field) {
3883
+ case 1:
3884
+ var value = new proto.Material;
3885
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3886
+ msg.addMaterials(value);
3887
+ break;
3888
+ case 2:
3889
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3890
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3891
+ msg.setMeta(value);
3892
+ break;
3893
+ default:
3894
+ reader.skipField();
3895
+ break;
3896
+ }
3897
+ }
3898
+ return msg;
3899
+ };
3900
+
3901
+
3902
+ /**
3903
+ * Serializes the message to binary data (in protobuf wire format).
3904
+ * @return {!Uint8Array}
3905
+ */
3906
+ proto.GetListMaterialResponse.prototype.serializeBinary = function() {
3907
+ var writer = new jspb.BinaryWriter();
3908
+ proto.GetListMaterialResponse.serializeBinaryToWriter(this, writer);
3909
+ return writer.getResultBuffer();
3910
+ };
3911
+
3912
+
3913
+ /**
3914
+ * Serializes the given message to binary data (in protobuf wire
3915
+ * format), writing to the given BinaryWriter.
3916
+ * @param {!proto.GetListMaterialResponse} message
3917
+ * @param {!jspb.BinaryWriter} writer
3918
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3919
+ */
3920
+ proto.GetListMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3921
+ var f = undefined;
3922
+ f = message.getMaterialsList();
3923
+ if (f.length > 0) {
3924
+ writer.writeRepeatedMessage(
3925
+ 1,
3926
+ f,
3927
+ proto.Material.serializeBinaryToWriter
3928
+ );
3929
+ }
3930
+ f = message.getMeta();
3931
+ if (f != null) {
3932
+ writer.writeMessage(
3933
+ 2,
3934
+ f,
3935
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3936
+ );
3937
+ }
3938
+ };
3939
+
3940
+
3941
+ /**
3942
+ * repeated Material materials = 1;
3943
+ * @return {!Array<!proto.Material>}
3944
+ */
3945
+ proto.GetListMaterialResponse.prototype.getMaterialsList = function() {
3946
+ return /** @type{!Array<!proto.Material>} */ (
3947
+ jspb.Message.getRepeatedWrapperField(this, proto.Material, 1));
3948
+ };
3949
+
3950
+
3951
+ /**
3952
+ * @param {!Array<!proto.Material>} value
3953
+ * @return {!proto.GetListMaterialResponse} returns this
3954
+ */
3955
+ proto.GetListMaterialResponse.prototype.setMaterialsList = function(value) {
3956
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
3957
+ };
3958
+
3959
+
3960
+ /**
3961
+ * @param {!proto.Material=} opt_value
3962
+ * @param {number=} opt_index
3963
+ * @return {!proto.Material}
3964
+ */
3965
+ proto.GetListMaterialResponse.prototype.addMaterials = function(opt_value, opt_index) {
3966
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Material, opt_index);
3967
+ };
3968
+
3969
+
3970
+ /**
3971
+ * Clears the list making it empty but non-null.
3972
+ * @return {!proto.GetListMaterialResponse} returns this
3973
+ */
3974
+ proto.GetListMaterialResponse.prototype.clearMaterialsList = function() {
3975
+ return this.setMaterialsList([]);
3976
+ };
3977
+
3978
+
3979
+ /**
3980
+ * optional prisca.v1.global.meta.Meta meta = 2;
3981
+ * @return {?proto.prisca.v1.global.meta.Meta}
3982
+ */
3983
+ proto.GetListMaterialResponse.prototype.getMeta = function() {
3984
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3985
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3986
+ };
3987
+
3988
+
3989
+ /**
3990
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3991
+ * @return {!proto.GetListMaterialResponse} returns this
3992
+ */
3993
+ proto.GetListMaterialResponse.prototype.setMeta = function(value) {
3994
+ return jspb.Message.setWrapperField(this, 2, value);
3995
+ };
3996
+
3997
+
3998
+ /**
3999
+ * Clears the message field making it undefined.
4000
+ * @return {!proto.GetListMaterialResponse} returns this
4001
+ */
4002
+ proto.GetListMaterialResponse.prototype.clearMeta = function() {
4003
+ return this.setMeta(undefined);
4004
+ };
4005
+
4006
+
4007
+ /**
4008
+ * Returns whether this field is set.
4009
+ * @return {boolean}
4010
+ */
4011
+ proto.GetListMaterialResponse.prototype.hasMeta = function() {
4012
+ return jspb.Message.getField(this, 2) != null;
4013
+ };
4014
+
4015
+
4016
+ goog.object.extend(exports, proto);