@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,2369 @@
1
+ // source: prisca/v1/core/material_type/material_type.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
+ goog.exportSymbol('proto.BaseMaterial', null, global);
27
+ goog.exportSymbol('proto.MaterialType', null, global);
28
+ goog.exportSymbol('proto.MaterialTypeGetByIdRequest', null, global);
29
+ goog.exportSymbol('proto.MaterialTypeGetByIdResponse', null, global);
30
+ goog.exportSymbol('proto.MaterialTypeListRequest', null, global);
31
+ goog.exportSymbol('proto.MaterialTypeListResponse', null, global);
32
+ goog.exportSymbol('proto.MaterialTypeRequest', null, global);
33
+ goog.exportSymbol('proto.MaterialTypeResponse', null, global);
34
+ goog.exportSymbol('proto.MaterialTypeUpdateRequest', null, global);
35
+ goog.exportSymbol('proto.MaterialTypeUpdateResponse', null, global);
36
+ /**
37
+ * Generated by JsPbCodeGenerator.
38
+ * @param {Array=} opt_data Optional initial data array, typically from a
39
+ * server response, or constructed directly in Javascript. The array is used
40
+ * in place and becomes part of the constructed object. It is not cloned.
41
+ * If no data is provided, the constructed object will be empty, but still
42
+ * valid.
43
+ * @extends {jspb.Message}
44
+ * @constructor
45
+ */
46
+ proto.MaterialType = function(opt_data) {
47
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.MaterialType.repeatedFields_, null);
48
+ };
49
+ goog.inherits(proto.MaterialType, jspb.Message);
50
+ if (goog.DEBUG && !COMPILED) {
51
+ /**
52
+ * @public
53
+ * @override
54
+ */
55
+ proto.MaterialType.displayName = 'proto.MaterialType';
56
+ }
57
+ /**
58
+ * Generated by JsPbCodeGenerator.
59
+ * @param {Array=} opt_data Optional initial data array, typically from a
60
+ * server response, or constructed directly in Javascript. The array is used
61
+ * in place and becomes part of the constructed object. It is not cloned.
62
+ * If no data is provided, the constructed object will be empty, but still
63
+ * valid.
64
+ * @extends {jspb.Message}
65
+ * @constructor
66
+ */
67
+ proto.BaseMaterial = function(opt_data) {
68
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.BaseMaterial.repeatedFields_, null);
69
+ };
70
+ goog.inherits(proto.BaseMaterial, jspb.Message);
71
+ if (goog.DEBUG && !COMPILED) {
72
+ /**
73
+ * @public
74
+ * @override
75
+ */
76
+ proto.BaseMaterial.displayName = 'proto.BaseMaterial';
77
+ }
78
+ /**
79
+ * Generated by JsPbCodeGenerator.
80
+ * @param {Array=} opt_data Optional initial data array, typically from a
81
+ * server response, or constructed directly in Javascript. The array is used
82
+ * in place and becomes part of the constructed object. It is not cloned.
83
+ * If no data is provided, the constructed object will be empty, but still
84
+ * valid.
85
+ * @extends {jspb.Message}
86
+ * @constructor
87
+ */
88
+ proto.MaterialTypeRequest = function(opt_data) {
89
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
90
+ };
91
+ goog.inherits(proto.MaterialTypeRequest, jspb.Message);
92
+ if (goog.DEBUG && !COMPILED) {
93
+ /**
94
+ * @public
95
+ * @override
96
+ */
97
+ proto.MaterialTypeRequest.displayName = 'proto.MaterialTypeRequest';
98
+ }
99
+ /**
100
+ * Generated by JsPbCodeGenerator.
101
+ * @param {Array=} opt_data Optional initial data array, typically from a
102
+ * server response, or constructed directly in Javascript. The array is used
103
+ * in place and becomes part of the constructed object. It is not cloned.
104
+ * If no data is provided, the constructed object will be empty, but still
105
+ * valid.
106
+ * @extends {jspb.Message}
107
+ * @constructor
108
+ */
109
+ proto.MaterialTypeListRequest = function(opt_data) {
110
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
111
+ };
112
+ goog.inherits(proto.MaterialTypeListRequest, jspb.Message);
113
+ if (goog.DEBUG && !COMPILED) {
114
+ /**
115
+ * @public
116
+ * @override
117
+ */
118
+ proto.MaterialTypeListRequest.displayName = 'proto.MaterialTypeListRequest';
119
+ }
120
+ /**
121
+ * Generated by JsPbCodeGenerator.
122
+ * @param {Array=} opt_data Optional initial data array, typically from a
123
+ * server response, or constructed directly in Javascript. The array is used
124
+ * in place and becomes part of the constructed object. It is not cloned.
125
+ * If no data is provided, the constructed object will be empty, but still
126
+ * valid.
127
+ * @extends {jspb.Message}
128
+ * @constructor
129
+ */
130
+ proto.MaterialTypeGetByIdRequest = function(opt_data) {
131
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
132
+ };
133
+ goog.inherits(proto.MaterialTypeGetByIdRequest, jspb.Message);
134
+ if (goog.DEBUG && !COMPILED) {
135
+ /**
136
+ * @public
137
+ * @override
138
+ */
139
+ proto.MaterialTypeGetByIdRequest.displayName = 'proto.MaterialTypeGetByIdRequest';
140
+ }
141
+ /**
142
+ * Generated by JsPbCodeGenerator.
143
+ * @param {Array=} opt_data Optional initial data array, typically from a
144
+ * server response, or constructed directly in Javascript. The array is used
145
+ * in place and becomes part of the constructed object. It is not cloned.
146
+ * If no data is provided, the constructed object will be empty, but still
147
+ * valid.
148
+ * @extends {jspb.Message}
149
+ * @constructor
150
+ */
151
+ proto.MaterialTypeUpdateRequest = function(opt_data) {
152
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
153
+ };
154
+ goog.inherits(proto.MaterialTypeUpdateRequest, jspb.Message);
155
+ if (goog.DEBUG && !COMPILED) {
156
+ /**
157
+ * @public
158
+ * @override
159
+ */
160
+ proto.MaterialTypeUpdateRequest.displayName = 'proto.MaterialTypeUpdateRequest';
161
+ }
162
+ /**
163
+ * Generated by JsPbCodeGenerator.
164
+ * @param {Array=} opt_data Optional initial data array, typically from a
165
+ * server response, or constructed directly in Javascript. The array is used
166
+ * in place and becomes part of the constructed object. It is not cloned.
167
+ * If no data is provided, the constructed object will be empty, but still
168
+ * valid.
169
+ * @extends {jspb.Message}
170
+ * @constructor
171
+ */
172
+ proto.MaterialTypeResponse = function(opt_data) {
173
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
174
+ };
175
+ goog.inherits(proto.MaterialTypeResponse, jspb.Message);
176
+ if (goog.DEBUG && !COMPILED) {
177
+ /**
178
+ * @public
179
+ * @override
180
+ */
181
+ proto.MaterialTypeResponse.displayName = 'proto.MaterialTypeResponse';
182
+ }
183
+ /**
184
+ * Generated by JsPbCodeGenerator.
185
+ * @param {Array=} opt_data Optional initial data array, typically from a
186
+ * server response, or constructed directly in Javascript. The array is used
187
+ * in place and becomes part of the constructed object. It is not cloned.
188
+ * If no data is provided, the constructed object will be empty, but still
189
+ * valid.
190
+ * @extends {jspb.Message}
191
+ * @constructor
192
+ */
193
+ proto.MaterialTypeListResponse = function(opt_data) {
194
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.MaterialTypeListResponse.repeatedFields_, null);
195
+ };
196
+ goog.inherits(proto.MaterialTypeListResponse, jspb.Message);
197
+ if (goog.DEBUG && !COMPILED) {
198
+ /**
199
+ * @public
200
+ * @override
201
+ */
202
+ proto.MaterialTypeListResponse.displayName = 'proto.MaterialTypeListResponse';
203
+ }
204
+ /**
205
+ * Generated by JsPbCodeGenerator.
206
+ * @param {Array=} opt_data Optional initial data array, typically from a
207
+ * server response, or constructed directly in Javascript. The array is used
208
+ * in place and becomes part of the constructed object. It is not cloned.
209
+ * If no data is provided, the constructed object will be empty, but still
210
+ * valid.
211
+ * @extends {jspb.Message}
212
+ * @constructor
213
+ */
214
+ proto.MaterialTypeGetByIdResponse = function(opt_data) {
215
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
216
+ };
217
+ goog.inherits(proto.MaterialTypeGetByIdResponse, jspb.Message);
218
+ if (goog.DEBUG && !COMPILED) {
219
+ /**
220
+ * @public
221
+ * @override
222
+ */
223
+ proto.MaterialTypeGetByIdResponse.displayName = 'proto.MaterialTypeGetByIdResponse';
224
+ }
225
+ /**
226
+ * Generated by JsPbCodeGenerator.
227
+ * @param {Array=} opt_data Optional initial data array, typically from a
228
+ * server response, or constructed directly in Javascript. The array is used
229
+ * in place and becomes part of the constructed object. It is not cloned.
230
+ * If no data is provided, the constructed object will be empty, but still
231
+ * valid.
232
+ * @extends {jspb.Message}
233
+ * @constructor
234
+ */
235
+ proto.MaterialTypeUpdateResponse = function(opt_data) {
236
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
237
+ };
238
+ goog.inherits(proto.MaterialTypeUpdateResponse, jspb.Message);
239
+ if (goog.DEBUG && !COMPILED) {
240
+ /**
241
+ * @public
242
+ * @override
243
+ */
244
+ proto.MaterialTypeUpdateResponse.displayName = 'proto.MaterialTypeUpdateResponse';
245
+ }
246
+
247
+ /**
248
+ * List of repeated fields within this message type.
249
+ * @private {!Array<number>}
250
+ * @const
251
+ */
252
+ proto.MaterialType.repeatedFields_ = [6];
253
+
254
+
255
+
256
+ if (jspb.Message.GENERATE_TO_OBJECT) {
257
+ /**
258
+ * Creates an object representation of this proto.
259
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
260
+ * Optional fields that are not set will be set to undefined.
261
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
262
+ * For the list of reserved names please see:
263
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
264
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
265
+ * JSPB instance for transitional soy proto support:
266
+ * http://goto/soy-param-migration
267
+ * @return {!Object}
268
+ */
269
+ proto.MaterialType.prototype.toObject = function(opt_includeInstance) {
270
+ return proto.MaterialType.toObject(opt_includeInstance, this);
271
+ };
272
+
273
+
274
+ /**
275
+ * Static version of the {@see toObject} method.
276
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
277
+ * the JSPB instance for transitional soy proto support:
278
+ * http://goto/soy-param-migration
279
+ * @param {!proto.MaterialType} msg The msg instance to transform.
280
+ * @return {!Object}
281
+ * @suppress {unusedLocalVariables} f is only used for nested messages
282
+ */
283
+ proto.MaterialType.toObject = function(includeInstance, msg) {
284
+ var f, obj = {
285
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
286
+ materialTypeCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
287
+ materialTypeDescription: jspb.Message.getFieldWithDefault(msg, 3, ""),
288
+ internalNumberRange: jspb.Message.getFieldWithDefault(msg, 4, ""),
289
+ externalNumberRange: jspb.Message.getFieldWithDefault(msg, 5, ""),
290
+ departmentUserList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f,
291
+ referencesId: jspb.Message.getFieldWithDefault(msg, 7, ""),
292
+ createdAt: jspb.Message.getFieldWithDefault(msg, 8, ""),
293
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 9, "")
294
+ };
295
+
296
+ if (includeInstance) {
297
+ obj.$jspbMessageInstance = msg;
298
+ }
299
+ return obj;
300
+ };
301
+ }
302
+
303
+
304
+ /**
305
+ * Deserializes binary data (in protobuf wire format).
306
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
307
+ * @return {!proto.MaterialType}
308
+ */
309
+ proto.MaterialType.deserializeBinary = function(bytes) {
310
+ var reader = new jspb.BinaryReader(bytes);
311
+ var msg = new proto.MaterialType;
312
+ return proto.MaterialType.deserializeBinaryFromReader(msg, reader);
313
+ };
314
+
315
+
316
+ /**
317
+ * Deserializes binary data (in protobuf wire format) from the
318
+ * given reader into the given message object.
319
+ * @param {!proto.MaterialType} msg The message object to deserialize into.
320
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
321
+ * @return {!proto.MaterialType}
322
+ */
323
+ proto.MaterialType.deserializeBinaryFromReader = function(msg, reader) {
324
+ while (reader.nextField()) {
325
+ if (reader.isEndGroup()) {
326
+ break;
327
+ }
328
+ var field = reader.getFieldNumber();
329
+ switch (field) {
330
+ case 1:
331
+ var value = /** @type {number} */ (reader.readInt64());
332
+ msg.setId(value);
333
+ break;
334
+ case 2:
335
+ var value = /** @type {string} */ (reader.readString());
336
+ msg.setMaterialTypeCode(value);
337
+ break;
338
+ case 3:
339
+ var value = /** @type {string} */ (reader.readString());
340
+ msg.setMaterialTypeDescription(value);
341
+ break;
342
+ case 4:
343
+ var value = /** @type {string} */ (reader.readString());
344
+ msg.setInternalNumberRange(value);
345
+ break;
346
+ case 5:
347
+ var value = /** @type {string} */ (reader.readString());
348
+ msg.setExternalNumberRange(value);
349
+ break;
350
+ case 6:
351
+ var value = /** @type {string} */ (reader.readString());
352
+ msg.addDepartmentUser(value);
353
+ break;
354
+ case 7:
355
+ var value = /** @type {string} */ (reader.readString());
356
+ msg.setReferencesId(value);
357
+ break;
358
+ case 8:
359
+ var value = /** @type {string} */ (reader.readString());
360
+ msg.setCreatedAt(value);
361
+ break;
362
+ case 9:
363
+ var value = /** @type {string} */ (reader.readString());
364
+ msg.setUpdatedAt(value);
365
+ break;
366
+ default:
367
+ reader.skipField();
368
+ break;
369
+ }
370
+ }
371
+ return msg;
372
+ };
373
+
374
+
375
+ /**
376
+ * Serializes the message to binary data (in protobuf wire format).
377
+ * @return {!Uint8Array}
378
+ */
379
+ proto.MaterialType.prototype.serializeBinary = function() {
380
+ var writer = new jspb.BinaryWriter();
381
+ proto.MaterialType.serializeBinaryToWriter(this, writer);
382
+ return writer.getResultBuffer();
383
+ };
384
+
385
+
386
+ /**
387
+ * Serializes the given message to binary data (in protobuf wire
388
+ * format), writing to the given BinaryWriter.
389
+ * @param {!proto.MaterialType} message
390
+ * @param {!jspb.BinaryWriter} writer
391
+ * @suppress {unusedLocalVariables} f is only used for nested messages
392
+ */
393
+ proto.MaterialType.serializeBinaryToWriter = function(message, writer) {
394
+ var f = undefined;
395
+ f = message.getId();
396
+ if (f !== 0) {
397
+ writer.writeInt64(
398
+ 1,
399
+ f
400
+ );
401
+ }
402
+ f = message.getMaterialTypeCode();
403
+ if (f.length > 0) {
404
+ writer.writeString(
405
+ 2,
406
+ f
407
+ );
408
+ }
409
+ f = message.getMaterialTypeDescription();
410
+ if (f.length > 0) {
411
+ writer.writeString(
412
+ 3,
413
+ f
414
+ );
415
+ }
416
+ f = message.getInternalNumberRange();
417
+ if (f.length > 0) {
418
+ writer.writeString(
419
+ 4,
420
+ f
421
+ );
422
+ }
423
+ f = message.getExternalNumberRange();
424
+ if (f.length > 0) {
425
+ writer.writeString(
426
+ 5,
427
+ f
428
+ );
429
+ }
430
+ f = message.getDepartmentUserList();
431
+ if (f.length > 0) {
432
+ writer.writeRepeatedString(
433
+ 6,
434
+ f
435
+ );
436
+ }
437
+ f = message.getReferencesId();
438
+ if (f.length > 0) {
439
+ writer.writeString(
440
+ 7,
441
+ f
442
+ );
443
+ }
444
+ f = message.getCreatedAt();
445
+ if (f.length > 0) {
446
+ writer.writeString(
447
+ 8,
448
+ f
449
+ );
450
+ }
451
+ f = message.getUpdatedAt();
452
+ if (f.length > 0) {
453
+ writer.writeString(
454
+ 9,
455
+ f
456
+ );
457
+ }
458
+ };
459
+
460
+
461
+ /**
462
+ * optional int64 id = 1;
463
+ * @return {number}
464
+ */
465
+ proto.MaterialType.prototype.getId = function() {
466
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
467
+ };
468
+
469
+
470
+ /**
471
+ * @param {number} value
472
+ * @return {!proto.MaterialType} returns this
473
+ */
474
+ proto.MaterialType.prototype.setId = function(value) {
475
+ return jspb.Message.setProto3IntField(this, 1, value);
476
+ };
477
+
478
+
479
+ /**
480
+ * optional string material_type_code = 2;
481
+ * @return {string}
482
+ */
483
+ proto.MaterialType.prototype.getMaterialTypeCode = function() {
484
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
485
+ };
486
+
487
+
488
+ /**
489
+ * @param {string} value
490
+ * @return {!proto.MaterialType} returns this
491
+ */
492
+ proto.MaterialType.prototype.setMaterialTypeCode = function(value) {
493
+ return jspb.Message.setProto3StringField(this, 2, value);
494
+ };
495
+
496
+
497
+ /**
498
+ * optional string material_type_description = 3;
499
+ * @return {string}
500
+ */
501
+ proto.MaterialType.prototype.getMaterialTypeDescription = function() {
502
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
503
+ };
504
+
505
+
506
+ /**
507
+ * @param {string} value
508
+ * @return {!proto.MaterialType} returns this
509
+ */
510
+ proto.MaterialType.prototype.setMaterialTypeDescription = function(value) {
511
+ return jspb.Message.setProto3StringField(this, 3, value);
512
+ };
513
+
514
+
515
+ /**
516
+ * optional string internal_number_range = 4;
517
+ * @return {string}
518
+ */
519
+ proto.MaterialType.prototype.getInternalNumberRange = function() {
520
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
521
+ };
522
+
523
+
524
+ /**
525
+ * @param {string} value
526
+ * @return {!proto.MaterialType} returns this
527
+ */
528
+ proto.MaterialType.prototype.setInternalNumberRange = function(value) {
529
+ return jspb.Message.setProto3StringField(this, 4, value);
530
+ };
531
+
532
+
533
+ /**
534
+ * optional string external_number_range = 5;
535
+ * @return {string}
536
+ */
537
+ proto.MaterialType.prototype.getExternalNumberRange = function() {
538
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
539
+ };
540
+
541
+
542
+ /**
543
+ * @param {string} value
544
+ * @return {!proto.MaterialType} returns this
545
+ */
546
+ proto.MaterialType.prototype.setExternalNumberRange = function(value) {
547
+ return jspb.Message.setProto3StringField(this, 5, value);
548
+ };
549
+
550
+
551
+ /**
552
+ * repeated string department_user = 6;
553
+ * @return {!Array<string>}
554
+ */
555
+ proto.MaterialType.prototype.getDepartmentUserList = function() {
556
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6));
557
+ };
558
+
559
+
560
+ /**
561
+ * @param {!Array<string>} value
562
+ * @return {!proto.MaterialType} returns this
563
+ */
564
+ proto.MaterialType.prototype.setDepartmentUserList = function(value) {
565
+ return jspb.Message.setField(this, 6, value || []);
566
+ };
567
+
568
+
569
+ /**
570
+ * @param {string} value
571
+ * @param {number=} opt_index
572
+ * @return {!proto.MaterialType} returns this
573
+ */
574
+ proto.MaterialType.prototype.addDepartmentUser = function(value, opt_index) {
575
+ return jspb.Message.addToRepeatedField(this, 6, value, opt_index);
576
+ };
577
+
578
+
579
+ /**
580
+ * Clears the list making it empty but non-null.
581
+ * @return {!proto.MaterialType} returns this
582
+ */
583
+ proto.MaterialType.prototype.clearDepartmentUserList = function() {
584
+ return this.setDepartmentUserList([]);
585
+ };
586
+
587
+
588
+ /**
589
+ * optional string references_id = 7;
590
+ * @return {string}
591
+ */
592
+ proto.MaterialType.prototype.getReferencesId = function() {
593
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
594
+ };
595
+
596
+
597
+ /**
598
+ * @param {string} value
599
+ * @return {!proto.MaterialType} returns this
600
+ */
601
+ proto.MaterialType.prototype.setReferencesId = function(value) {
602
+ return jspb.Message.setProto3StringField(this, 7, value);
603
+ };
604
+
605
+
606
+ /**
607
+ * optional string created_at = 8;
608
+ * @return {string}
609
+ */
610
+ proto.MaterialType.prototype.getCreatedAt = function() {
611
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
612
+ };
613
+
614
+
615
+ /**
616
+ * @param {string} value
617
+ * @return {!proto.MaterialType} returns this
618
+ */
619
+ proto.MaterialType.prototype.setCreatedAt = function(value) {
620
+ return jspb.Message.setProto3StringField(this, 8, value);
621
+ };
622
+
623
+
624
+ /**
625
+ * optional string updated_at = 9;
626
+ * @return {string}
627
+ */
628
+ proto.MaterialType.prototype.getUpdatedAt = function() {
629
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
630
+ };
631
+
632
+
633
+ /**
634
+ * @param {string} value
635
+ * @return {!proto.MaterialType} returns this
636
+ */
637
+ proto.MaterialType.prototype.setUpdatedAt = function(value) {
638
+ return jspb.Message.setProto3StringField(this, 9, value);
639
+ };
640
+
641
+
642
+
643
+ /**
644
+ * List of repeated fields within this message type.
645
+ * @private {!Array<number>}
646
+ * @const
647
+ */
648
+ proto.BaseMaterial.repeatedFields_ = [5];
649
+
650
+
651
+
652
+ if (jspb.Message.GENERATE_TO_OBJECT) {
653
+ /**
654
+ * Creates an object representation of this proto.
655
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
656
+ * Optional fields that are not set will be set to undefined.
657
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
658
+ * For the list of reserved names please see:
659
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
660
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
661
+ * JSPB instance for transitional soy proto support:
662
+ * http://goto/soy-param-migration
663
+ * @return {!Object}
664
+ */
665
+ proto.BaseMaterial.prototype.toObject = function(opt_includeInstance) {
666
+ return proto.BaseMaterial.toObject(opt_includeInstance, this);
667
+ };
668
+
669
+
670
+ /**
671
+ * Static version of the {@see toObject} method.
672
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
673
+ * the JSPB instance for transitional soy proto support:
674
+ * http://goto/soy-param-migration
675
+ * @param {!proto.BaseMaterial} msg The msg instance to transform.
676
+ * @return {!Object}
677
+ * @suppress {unusedLocalVariables} f is only used for nested messages
678
+ */
679
+ proto.BaseMaterial.toObject = function(includeInstance, msg) {
680
+ var f, obj = {
681
+ materialTypeCode: jspb.Message.getFieldWithDefault(msg, 1, ""),
682
+ materialTypeDescription: jspb.Message.getFieldWithDefault(msg, 2, ""),
683
+ internalNumberRange: jspb.Message.getFieldWithDefault(msg, 3, ""),
684
+ externalNumberRange: jspb.Message.getFieldWithDefault(msg, 4, ""),
685
+ departmentUserList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
686
+ };
687
+
688
+ if (includeInstance) {
689
+ obj.$jspbMessageInstance = msg;
690
+ }
691
+ return obj;
692
+ };
693
+ }
694
+
695
+
696
+ /**
697
+ * Deserializes binary data (in protobuf wire format).
698
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
699
+ * @return {!proto.BaseMaterial}
700
+ */
701
+ proto.BaseMaterial.deserializeBinary = function(bytes) {
702
+ var reader = new jspb.BinaryReader(bytes);
703
+ var msg = new proto.BaseMaterial;
704
+ return proto.BaseMaterial.deserializeBinaryFromReader(msg, reader);
705
+ };
706
+
707
+
708
+ /**
709
+ * Deserializes binary data (in protobuf wire format) from the
710
+ * given reader into the given message object.
711
+ * @param {!proto.BaseMaterial} msg The message object to deserialize into.
712
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
713
+ * @return {!proto.BaseMaterial}
714
+ */
715
+ proto.BaseMaterial.deserializeBinaryFromReader = function(msg, reader) {
716
+ while (reader.nextField()) {
717
+ if (reader.isEndGroup()) {
718
+ break;
719
+ }
720
+ var field = reader.getFieldNumber();
721
+ switch (field) {
722
+ case 1:
723
+ var value = /** @type {string} */ (reader.readString());
724
+ msg.setMaterialTypeCode(value);
725
+ break;
726
+ case 2:
727
+ var value = /** @type {string} */ (reader.readString());
728
+ msg.setMaterialTypeDescription(value);
729
+ break;
730
+ case 3:
731
+ var value = /** @type {string} */ (reader.readString());
732
+ msg.setInternalNumberRange(value);
733
+ break;
734
+ case 4:
735
+ var value = /** @type {string} */ (reader.readString());
736
+ msg.setExternalNumberRange(value);
737
+ break;
738
+ case 5:
739
+ var value = /** @type {string} */ (reader.readString());
740
+ msg.addDepartmentUser(value);
741
+ break;
742
+ default:
743
+ reader.skipField();
744
+ break;
745
+ }
746
+ }
747
+ return msg;
748
+ };
749
+
750
+
751
+ /**
752
+ * Serializes the message to binary data (in protobuf wire format).
753
+ * @return {!Uint8Array}
754
+ */
755
+ proto.BaseMaterial.prototype.serializeBinary = function() {
756
+ var writer = new jspb.BinaryWriter();
757
+ proto.BaseMaterial.serializeBinaryToWriter(this, writer);
758
+ return writer.getResultBuffer();
759
+ };
760
+
761
+
762
+ /**
763
+ * Serializes the given message to binary data (in protobuf wire
764
+ * format), writing to the given BinaryWriter.
765
+ * @param {!proto.BaseMaterial} message
766
+ * @param {!jspb.BinaryWriter} writer
767
+ * @suppress {unusedLocalVariables} f is only used for nested messages
768
+ */
769
+ proto.BaseMaterial.serializeBinaryToWriter = function(message, writer) {
770
+ var f = undefined;
771
+ f = message.getMaterialTypeCode();
772
+ if (f.length > 0) {
773
+ writer.writeString(
774
+ 1,
775
+ f
776
+ );
777
+ }
778
+ f = message.getMaterialTypeDescription();
779
+ if (f.length > 0) {
780
+ writer.writeString(
781
+ 2,
782
+ f
783
+ );
784
+ }
785
+ f = message.getInternalNumberRange();
786
+ if (f.length > 0) {
787
+ writer.writeString(
788
+ 3,
789
+ f
790
+ );
791
+ }
792
+ f = message.getExternalNumberRange();
793
+ if (f.length > 0) {
794
+ writer.writeString(
795
+ 4,
796
+ f
797
+ );
798
+ }
799
+ f = message.getDepartmentUserList();
800
+ if (f.length > 0) {
801
+ writer.writeRepeatedString(
802
+ 5,
803
+ f
804
+ );
805
+ }
806
+ };
807
+
808
+
809
+ /**
810
+ * optional string material_type_code = 1;
811
+ * @return {string}
812
+ */
813
+ proto.BaseMaterial.prototype.getMaterialTypeCode = function() {
814
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
815
+ };
816
+
817
+
818
+ /**
819
+ * @param {string} value
820
+ * @return {!proto.BaseMaterial} returns this
821
+ */
822
+ proto.BaseMaterial.prototype.setMaterialTypeCode = function(value) {
823
+ return jspb.Message.setProto3StringField(this, 1, value);
824
+ };
825
+
826
+
827
+ /**
828
+ * optional string material_type_description = 2;
829
+ * @return {string}
830
+ */
831
+ proto.BaseMaterial.prototype.getMaterialTypeDescription = function() {
832
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
833
+ };
834
+
835
+
836
+ /**
837
+ * @param {string} value
838
+ * @return {!proto.BaseMaterial} returns this
839
+ */
840
+ proto.BaseMaterial.prototype.setMaterialTypeDescription = function(value) {
841
+ return jspb.Message.setProto3StringField(this, 2, value);
842
+ };
843
+
844
+
845
+ /**
846
+ * optional string internal_number_range = 3;
847
+ * @return {string}
848
+ */
849
+ proto.BaseMaterial.prototype.getInternalNumberRange = function() {
850
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
851
+ };
852
+
853
+
854
+ /**
855
+ * @param {string} value
856
+ * @return {!proto.BaseMaterial} returns this
857
+ */
858
+ proto.BaseMaterial.prototype.setInternalNumberRange = function(value) {
859
+ return jspb.Message.setProto3StringField(this, 3, value);
860
+ };
861
+
862
+
863
+ /**
864
+ * optional string external_number_range = 4;
865
+ * @return {string}
866
+ */
867
+ proto.BaseMaterial.prototype.getExternalNumberRange = function() {
868
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
869
+ };
870
+
871
+
872
+ /**
873
+ * @param {string} value
874
+ * @return {!proto.BaseMaterial} returns this
875
+ */
876
+ proto.BaseMaterial.prototype.setExternalNumberRange = function(value) {
877
+ return jspb.Message.setProto3StringField(this, 4, value);
878
+ };
879
+
880
+
881
+ /**
882
+ * repeated string department_user = 5;
883
+ * @return {!Array<string>}
884
+ */
885
+ proto.BaseMaterial.prototype.getDepartmentUserList = function() {
886
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
887
+ };
888
+
889
+
890
+ /**
891
+ * @param {!Array<string>} value
892
+ * @return {!proto.BaseMaterial} returns this
893
+ */
894
+ proto.BaseMaterial.prototype.setDepartmentUserList = function(value) {
895
+ return jspb.Message.setField(this, 5, value || []);
896
+ };
897
+
898
+
899
+ /**
900
+ * @param {string} value
901
+ * @param {number=} opt_index
902
+ * @return {!proto.BaseMaterial} returns this
903
+ */
904
+ proto.BaseMaterial.prototype.addDepartmentUser = function(value, opt_index) {
905
+ return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
906
+ };
907
+
908
+
909
+ /**
910
+ * Clears the list making it empty but non-null.
911
+ * @return {!proto.BaseMaterial} returns this
912
+ */
913
+ proto.BaseMaterial.prototype.clearDepartmentUserList = function() {
914
+ return this.setDepartmentUserList([]);
915
+ };
916
+
917
+
918
+
919
+
920
+
921
+ if (jspb.Message.GENERATE_TO_OBJECT) {
922
+ /**
923
+ * Creates an object representation of this proto.
924
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
925
+ * Optional fields that are not set will be set to undefined.
926
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
927
+ * For the list of reserved names please see:
928
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
929
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
930
+ * JSPB instance for transitional soy proto support:
931
+ * http://goto/soy-param-migration
932
+ * @return {!Object}
933
+ */
934
+ proto.MaterialTypeRequest.prototype.toObject = function(opt_includeInstance) {
935
+ return proto.MaterialTypeRequest.toObject(opt_includeInstance, this);
936
+ };
937
+
938
+
939
+ /**
940
+ * Static version of the {@see toObject} method.
941
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
942
+ * the JSPB instance for transitional soy proto support:
943
+ * http://goto/soy-param-migration
944
+ * @param {!proto.MaterialTypeRequest} msg The msg instance to transform.
945
+ * @return {!Object}
946
+ * @suppress {unusedLocalVariables} f is only used for nested messages
947
+ */
948
+ proto.MaterialTypeRequest.toObject = function(includeInstance, msg) {
949
+ var f, obj = {
950
+ materialType: (f = msg.getMaterialType()) && proto.BaseMaterial.toObject(includeInstance, f)
951
+ };
952
+
953
+ if (includeInstance) {
954
+ obj.$jspbMessageInstance = msg;
955
+ }
956
+ return obj;
957
+ };
958
+ }
959
+
960
+
961
+ /**
962
+ * Deserializes binary data (in protobuf wire format).
963
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
964
+ * @return {!proto.MaterialTypeRequest}
965
+ */
966
+ proto.MaterialTypeRequest.deserializeBinary = function(bytes) {
967
+ var reader = new jspb.BinaryReader(bytes);
968
+ var msg = new proto.MaterialTypeRequest;
969
+ return proto.MaterialTypeRequest.deserializeBinaryFromReader(msg, reader);
970
+ };
971
+
972
+
973
+ /**
974
+ * Deserializes binary data (in protobuf wire format) from the
975
+ * given reader into the given message object.
976
+ * @param {!proto.MaterialTypeRequest} msg The message object to deserialize into.
977
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
978
+ * @return {!proto.MaterialTypeRequest}
979
+ */
980
+ proto.MaterialTypeRequest.deserializeBinaryFromReader = function(msg, reader) {
981
+ while (reader.nextField()) {
982
+ if (reader.isEndGroup()) {
983
+ break;
984
+ }
985
+ var field = reader.getFieldNumber();
986
+ switch (field) {
987
+ case 1:
988
+ var value = new proto.BaseMaterial;
989
+ reader.readMessage(value,proto.BaseMaterial.deserializeBinaryFromReader);
990
+ msg.setMaterialType(value);
991
+ break;
992
+ default:
993
+ reader.skipField();
994
+ break;
995
+ }
996
+ }
997
+ return msg;
998
+ };
999
+
1000
+
1001
+ /**
1002
+ * Serializes the message to binary data (in protobuf wire format).
1003
+ * @return {!Uint8Array}
1004
+ */
1005
+ proto.MaterialTypeRequest.prototype.serializeBinary = function() {
1006
+ var writer = new jspb.BinaryWriter();
1007
+ proto.MaterialTypeRequest.serializeBinaryToWriter(this, writer);
1008
+ return writer.getResultBuffer();
1009
+ };
1010
+
1011
+
1012
+ /**
1013
+ * Serializes the given message to binary data (in protobuf wire
1014
+ * format), writing to the given BinaryWriter.
1015
+ * @param {!proto.MaterialTypeRequest} message
1016
+ * @param {!jspb.BinaryWriter} writer
1017
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1018
+ */
1019
+ proto.MaterialTypeRequest.serializeBinaryToWriter = function(message, writer) {
1020
+ var f = undefined;
1021
+ f = message.getMaterialType();
1022
+ if (f != null) {
1023
+ writer.writeMessage(
1024
+ 1,
1025
+ f,
1026
+ proto.BaseMaterial.serializeBinaryToWriter
1027
+ );
1028
+ }
1029
+ };
1030
+
1031
+
1032
+ /**
1033
+ * optional BaseMaterial material_type = 1;
1034
+ * @return {?proto.BaseMaterial}
1035
+ */
1036
+ proto.MaterialTypeRequest.prototype.getMaterialType = function() {
1037
+ return /** @type{?proto.BaseMaterial} */ (
1038
+ jspb.Message.getWrapperField(this, proto.BaseMaterial, 1));
1039
+ };
1040
+
1041
+
1042
+ /**
1043
+ * @param {?proto.BaseMaterial|undefined} value
1044
+ * @return {!proto.MaterialTypeRequest} returns this
1045
+ */
1046
+ proto.MaterialTypeRequest.prototype.setMaterialType = function(value) {
1047
+ return jspb.Message.setWrapperField(this, 1, value);
1048
+ };
1049
+
1050
+
1051
+ /**
1052
+ * Clears the message field making it undefined.
1053
+ * @return {!proto.MaterialTypeRequest} returns this
1054
+ */
1055
+ proto.MaterialTypeRequest.prototype.clearMaterialType = function() {
1056
+ return this.setMaterialType(undefined);
1057
+ };
1058
+
1059
+
1060
+ /**
1061
+ * Returns whether this field is set.
1062
+ * @return {boolean}
1063
+ */
1064
+ proto.MaterialTypeRequest.prototype.hasMaterialType = function() {
1065
+ return jspb.Message.getField(this, 1) != null;
1066
+ };
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1073
+ /**
1074
+ * Creates an object representation of this proto.
1075
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1076
+ * Optional fields that are not set will be set to undefined.
1077
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1078
+ * For the list of reserved names please see:
1079
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1080
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1081
+ * JSPB instance for transitional soy proto support:
1082
+ * http://goto/soy-param-migration
1083
+ * @return {!Object}
1084
+ */
1085
+ proto.MaterialTypeListRequest.prototype.toObject = function(opt_includeInstance) {
1086
+ return proto.MaterialTypeListRequest.toObject(opt_includeInstance, this);
1087
+ };
1088
+
1089
+
1090
+ /**
1091
+ * Static version of the {@see toObject} method.
1092
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1093
+ * the JSPB instance for transitional soy proto support:
1094
+ * http://goto/soy-param-migration
1095
+ * @param {!proto.MaterialTypeListRequest} msg The msg instance to transform.
1096
+ * @return {!Object}
1097
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1098
+ */
1099
+ proto.MaterialTypeListRequest.toObject = function(includeInstance, msg) {
1100
+ var f, obj = {
1101
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
1102
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
1103
+ };
1104
+
1105
+ if (includeInstance) {
1106
+ obj.$jspbMessageInstance = msg;
1107
+ }
1108
+ return obj;
1109
+ };
1110
+ }
1111
+
1112
+
1113
+ /**
1114
+ * Deserializes binary data (in protobuf wire format).
1115
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1116
+ * @return {!proto.MaterialTypeListRequest}
1117
+ */
1118
+ proto.MaterialTypeListRequest.deserializeBinary = function(bytes) {
1119
+ var reader = new jspb.BinaryReader(bytes);
1120
+ var msg = new proto.MaterialTypeListRequest;
1121
+ return proto.MaterialTypeListRequest.deserializeBinaryFromReader(msg, reader);
1122
+ };
1123
+
1124
+
1125
+ /**
1126
+ * Deserializes binary data (in protobuf wire format) from the
1127
+ * given reader into the given message object.
1128
+ * @param {!proto.MaterialTypeListRequest} msg The message object to deserialize into.
1129
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1130
+ * @return {!proto.MaterialTypeListRequest}
1131
+ */
1132
+ proto.MaterialTypeListRequest.deserializeBinaryFromReader = function(msg, reader) {
1133
+ while (reader.nextField()) {
1134
+ if (reader.isEndGroup()) {
1135
+ break;
1136
+ }
1137
+ var field = reader.getFieldNumber();
1138
+ switch (field) {
1139
+ case 1:
1140
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
1141
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
1142
+ msg.setPagination(value);
1143
+ break;
1144
+ case 2:
1145
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
1146
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
1147
+ msg.setQuery(value);
1148
+ break;
1149
+ default:
1150
+ reader.skipField();
1151
+ break;
1152
+ }
1153
+ }
1154
+ return msg;
1155
+ };
1156
+
1157
+
1158
+ /**
1159
+ * Serializes the message to binary data (in protobuf wire format).
1160
+ * @return {!Uint8Array}
1161
+ */
1162
+ proto.MaterialTypeListRequest.prototype.serializeBinary = function() {
1163
+ var writer = new jspb.BinaryWriter();
1164
+ proto.MaterialTypeListRequest.serializeBinaryToWriter(this, writer);
1165
+ return writer.getResultBuffer();
1166
+ };
1167
+
1168
+
1169
+ /**
1170
+ * Serializes the given message to binary data (in protobuf wire
1171
+ * format), writing to the given BinaryWriter.
1172
+ * @param {!proto.MaterialTypeListRequest} message
1173
+ * @param {!jspb.BinaryWriter} writer
1174
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1175
+ */
1176
+ proto.MaterialTypeListRequest.serializeBinaryToWriter = function(message, writer) {
1177
+ var f = undefined;
1178
+ f = message.getPagination();
1179
+ if (f != null) {
1180
+ writer.writeMessage(
1181
+ 1,
1182
+ f,
1183
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
1184
+ );
1185
+ }
1186
+ f = message.getQuery();
1187
+ if (f != null) {
1188
+ writer.writeMessage(
1189
+ 2,
1190
+ f,
1191
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
1192
+ );
1193
+ }
1194
+ };
1195
+
1196
+
1197
+ /**
1198
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
1199
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
1200
+ */
1201
+ proto.MaterialTypeListRequest.prototype.getPagination = function() {
1202
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
1203
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
1204
+ };
1205
+
1206
+
1207
+ /**
1208
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
1209
+ * @return {!proto.MaterialTypeListRequest} returns this
1210
+ */
1211
+ proto.MaterialTypeListRequest.prototype.setPagination = function(value) {
1212
+ return jspb.Message.setWrapperField(this, 1, value);
1213
+ };
1214
+
1215
+
1216
+ /**
1217
+ * Clears the message field making it undefined.
1218
+ * @return {!proto.MaterialTypeListRequest} returns this
1219
+ */
1220
+ proto.MaterialTypeListRequest.prototype.clearPagination = function() {
1221
+ return this.setPagination(undefined);
1222
+ };
1223
+
1224
+
1225
+ /**
1226
+ * Returns whether this field is set.
1227
+ * @return {boolean}
1228
+ */
1229
+ proto.MaterialTypeListRequest.prototype.hasPagination = function() {
1230
+ return jspb.Message.getField(this, 1) != null;
1231
+ };
1232
+
1233
+
1234
+ /**
1235
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
1236
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
1237
+ */
1238
+ proto.MaterialTypeListRequest.prototype.getQuery = function() {
1239
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
1240
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
1241
+ };
1242
+
1243
+
1244
+ /**
1245
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
1246
+ * @return {!proto.MaterialTypeListRequest} returns this
1247
+ */
1248
+ proto.MaterialTypeListRequest.prototype.setQuery = function(value) {
1249
+ return jspb.Message.setWrapperField(this, 2, value);
1250
+ };
1251
+
1252
+
1253
+ /**
1254
+ * Clears the message field making it undefined.
1255
+ * @return {!proto.MaterialTypeListRequest} returns this
1256
+ */
1257
+ proto.MaterialTypeListRequest.prototype.clearQuery = function() {
1258
+ return this.setQuery(undefined);
1259
+ };
1260
+
1261
+
1262
+ /**
1263
+ * Returns whether this field is set.
1264
+ * @return {boolean}
1265
+ */
1266
+ proto.MaterialTypeListRequest.prototype.hasQuery = function() {
1267
+ return jspb.Message.getField(this, 2) != null;
1268
+ };
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1275
+ /**
1276
+ * Creates an object representation of this proto.
1277
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1278
+ * Optional fields that are not set will be set to undefined.
1279
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1280
+ * For the list of reserved names please see:
1281
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1282
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1283
+ * JSPB instance for transitional soy proto support:
1284
+ * http://goto/soy-param-migration
1285
+ * @return {!Object}
1286
+ */
1287
+ proto.MaterialTypeGetByIdRequest.prototype.toObject = function(opt_includeInstance) {
1288
+ return proto.MaterialTypeGetByIdRequest.toObject(opt_includeInstance, this);
1289
+ };
1290
+
1291
+
1292
+ /**
1293
+ * Static version of the {@see toObject} method.
1294
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1295
+ * the JSPB instance for transitional soy proto support:
1296
+ * http://goto/soy-param-migration
1297
+ * @param {!proto.MaterialTypeGetByIdRequest} msg The msg instance to transform.
1298
+ * @return {!Object}
1299
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1300
+ */
1301
+ proto.MaterialTypeGetByIdRequest.toObject = function(includeInstance, msg) {
1302
+ var f, obj = {
1303
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1304
+ };
1305
+
1306
+ if (includeInstance) {
1307
+ obj.$jspbMessageInstance = msg;
1308
+ }
1309
+ return obj;
1310
+ };
1311
+ }
1312
+
1313
+
1314
+ /**
1315
+ * Deserializes binary data (in protobuf wire format).
1316
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1317
+ * @return {!proto.MaterialTypeGetByIdRequest}
1318
+ */
1319
+ proto.MaterialTypeGetByIdRequest.deserializeBinary = function(bytes) {
1320
+ var reader = new jspb.BinaryReader(bytes);
1321
+ var msg = new proto.MaterialTypeGetByIdRequest;
1322
+ return proto.MaterialTypeGetByIdRequest.deserializeBinaryFromReader(msg, reader);
1323
+ };
1324
+
1325
+
1326
+ /**
1327
+ * Deserializes binary data (in protobuf wire format) from the
1328
+ * given reader into the given message object.
1329
+ * @param {!proto.MaterialTypeGetByIdRequest} msg The message object to deserialize into.
1330
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1331
+ * @return {!proto.MaterialTypeGetByIdRequest}
1332
+ */
1333
+ proto.MaterialTypeGetByIdRequest.deserializeBinaryFromReader = function(msg, reader) {
1334
+ while (reader.nextField()) {
1335
+ if (reader.isEndGroup()) {
1336
+ break;
1337
+ }
1338
+ var field = reader.getFieldNumber();
1339
+ switch (field) {
1340
+ case 1:
1341
+ var value = /** @type {number} */ (reader.readInt64());
1342
+ msg.setId(value);
1343
+ break;
1344
+ default:
1345
+ reader.skipField();
1346
+ break;
1347
+ }
1348
+ }
1349
+ return msg;
1350
+ };
1351
+
1352
+
1353
+ /**
1354
+ * Serializes the message to binary data (in protobuf wire format).
1355
+ * @return {!Uint8Array}
1356
+ */
1357
+ proto.MaterialTypeGetByIdRequest.prototype.serializeBinary = function() {
1358
+ var writer = new jspb.BinaryWriter();
1359
+ proto.MaterialTypeGetByIdRequest.serializeBinaryToWriter(this, writer);
1360
+ return writer.getResultBuffer();
1361
+ };
1362
+
1363
+
1364
+ /**
1365
+ * Serializes the given message to binary data (in protobuf wire
1366
+ * format), writing to the given BinaryWriter.
1367
+ * @param {!proto.MaterialTypeGetByIdRequest} message
1368
+ * @param {!jspb.BinaryWriter} writer
1369
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1370
+ */
1371
+ proto.MaterialTypeGetByIdRequest.serializeBinaryToWriter = function(message, writer) {
1372
+ var f = undefined;
1373
+ f = message.getId();
1374
+ if (f !== 0) {
1375
+ writer.writeInt64(
1376
+ 1,
1377
+ f
1378
+ );
1379
+ }
1380
+ };
1381
+
1382
+
1383
+ /**
1384
+ * optional int64 id = 1;
1385
+ * @return {number}
1386
+ */
1387
+ proto.MaterialTypeGetByIdRequest.prototype.getId = function() {
1388
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1389
+ };
1390
+
1391
+
1392
+ /**
1393
+ * @param {number} value
1394
+ * @return {!proto.MaterialTypeGetByIdRequest} returns this
1395
+ */
1396
+ proto.MaterialTypeGetByIdRequest.prototype.setId = function(value) {
1397
+ return jspb.Message.setProto3IntField(this, 1, value);
1398
+ };
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1405
+ /**
1406
+ * Creates an object representation of this proto.
1407
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1408
+ * Optional fields that are not set will be set to undefined.
1409
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1410
+ * For the list of reserved names please see:
1411
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1412
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1413
+ * JSPB instance for transitional soy proto support:
1414
+ * http://goto/soy-param-migration
1415
+ * @return {!Object}
1416
+ */
1417
+ proto.MaterialTypeUpdateRequest.prototype.toObject = function(opt_includeInstance) {
1418
+ return proto.MaterialTypeUpdateRequest.toObject(opt_includeInstance, this);
1419
+ };
1420
+
1421
+
1422
+ /**
1423
+ * Static version of the {@see toObject} method.
1424
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1425
+ * the JSPB instance for transitional soy proto support:
1426
+ * http://goto/soy-param-migration
1427
+ * @param {!proto.MaterialTypeUpdateRequest} msg The msg instance to transform.
1428
+ * @return {!Object}
1429
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1430
+ */
1431
+ proto.MaterialTypeUpdateRequest.toObject = function(includeInstance, msg) {
1432
+ var f, obj = {
1433
+ materialType: (f = msg.getMaterialType()) && proto.MaterialType.toObject(includeInstance, f)
1434
+ };
1435
+
1436
+ if (includeInstance) {
1437
+ obj.$jspbMessageInstance = msg;
1438
+ }
1439
+ return obj;
1440
+ };
1441
+ }
1442
+
1443
+
1444
+ /**
1445
+ * Deserializes binary data (in protobuf wire format).
1446
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1447
+ * @return {!proto.MaterialTypeUpdateRequest}
1448
+ */
1449
+ proto.MaterialTypeUpdateRequest.deserializeBinary = function(bytes) {
1450
+ var reader = new jspb.BinaryReader(bytes);
1451
+ var msg = new proto.MaterialTypeUpdateRequest;
1452
+ return proto.MaterialTypeUpdateRequest.deserializeBinaryFromReader(msg, reader);
1453
+ };
1454
+
1455
+
1456
+ /**
1457
+ * Deserializes binary data (in protobuf wire format) from the
1458
+ * given reader into the given message object.
1459
+ * @param {!proto.MaterialTypeUpdateRequest} msg The message object to deserialize into.
1460
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1461
+ * @return {!proto.MaterialTypeUpdateRequest}
1462
+ */
1463
+ proto.MaterialTypeUpdateRequest.deserializeBinaryFromReader = function(msg, reader) {
1464
+ while (reader.nextField()) {
1465
+ if (reader.isEndGroup()) {
1466
+ break;
1467
+ }
1468
+ var field = reader.getFieldNumber();
1469
+ switch (field) {
1470
+ case 1:
1471
+ var value = new proto.MaterialType;
1472
+ reader.readMessage(value,proto.MaterialType.deserializeBinaryFromReader);
1473
+ msg.setMaterialType(value);
1474
+ break;
1475
+ default:
1476
+ reader.skipField();
1477
+ break;
1478
+ }
1479
+ }
1480
+ return msg;
1481
+ };
1482
+
1483
+
1484
+ /**
1485
+ * Serializes the message to binary data (in protobuf wire format).
1486
+ * @return {!Uint8Array}
1487
+ */
1488
+ proto.MaterialTypeUpdateRequest.prototype.serializeBinary = function() {
1489
+ var writer = new jspb.BinaryWriter();
1490
+ proto.MaterialTypeUpdateRequest.serializeBinaryToWriter(this, writer);
1491
+ return writer.getResultBuffer();
1492
+ };
1493
+
1494
+
1495
+ /**
1496
+ * Serializes the given message to binary data (in protobuf wire
1497
+ * format), writing to the given BinaryWriter.
1498
+ * @param {!proto.MaterialTypeUpdateRequest} message
1499
+ * @param {!jspb.BinaryWriter} writer
1500
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1501
+ */
1502
+ proto.MaterialTypeUpdateRequest.serializeBinaryToWriter = function(message, writer) {
1503
+ var f = undefined;
1504
+ f = message.getMaterialType();
1505
+ if (f != null) {
1506
+ writer.writeMessage(
1507
+ 1,
1508
+ f,
1509
+ proto.MaterialType.serializeBinaryToWriter
1510
+ );
1511
+ }
1512
+ };
1513
+
1514
+
1515
+ /**
1516
+ * optional MaterialType material_type = 1;
1517
+ * @return {?proto.MaterialType}
1518
+ */
1519
+ proto.MaterialTypeUpdateRequest.prototype.getMaterialType = function() {
1520
+ return /** @type{?proto.MaterialType} */ (
1521
+ jspb.Message.getWrapperField(this, proto.MaterialType, 1));
1522
+ };
1523
+
1524
+
1525
+ /**
1526
+ * @param {?proto.MaterialType|undefined} value
1527
+ * @return {!proto.MaterialTypeUpdateRequest} returns this
1528
+ */
1529
+ proto.MaterialTypeUpdateRequest.prototype.setMaterialType = function(value) {
1530
+ return jspb.Message.setWrapperField(this, 1, value);
1531
+ };
1532
+
1533
+
1534
+ /**
1535
+ * Clears the message field making it undefined.
1536
+ * @return {!proto.MaterialTypeUpdateRequest} returns this
1537
+ */
1538
+ proto.MaterialTypeUpdateRequest.prototype.clearMaterialType = function() {
1539
+ return this.setMaterialType(undefined);
1540
+ };
1541
+
1542
+
1543
+ /**
1544
+ * Returns whether this field is set.
1545
+ * @return {boolean}
1546
+ */
1547
+ proto.MaterialTypeUpdateRequest.prototype.hasMaterialType = function() {
1548
+ return jspb.Message.getField(this, 1) != null;
1549
+ };
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1556
+ /**
1557
+ * Creates an object representation of this proto.
1558
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1559
+ * Optional fields that are not set will be set to undefined.
1560
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1561
+ * For the list of reserved names please see:
1562
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1563
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1564
+ * JSPB instance for transitional soy proto support:
1565
+ * http://goto/soy-param-migration
1566
+ * @return {!Object}
1567
+ */
1568
+ proto.MaterialTypeResponse.prototype.toObject = function(opt_includeInstance) {
1569
+ return proto.MaterialTypeResponse.toObject(opt_includeInstance, this);
1570
+ };
1571
+
1572
+
1573
+ /**
1574
+ * Static version of the {@see toObject} method.
1575
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1576
+ * the JSPB instance for transitional soy proto support:
1577
+ * http://goto/soy-param-migration
1578
+ * @param {!proto.MaterialTypeResponse} msg The msg instance to transform.
1579
+ * @return {!Object}
1580
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1581
+ */
1582
+ proto.MaterialTypeResponse.toObject = function(includeInstance, msg) {
1583
+ var f, obj = {
1584
+ materialType: (f = msg.getMaterialType()) && proto.MaterialType.toObject(includeInstance, f),
1585
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1586
+ };
1587
+
1588
+ if (includeInstance) {
1589
+ obj.$jspbMessageInstance = msg;
1590
+ }
1591
+ return obj;
1592
+ };
1593
+ }
1594
+
1595
+
1596
+ /**
1597
+ * Deserializes binary data (in protobuf wire format).
1598
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1599
+ * @return {!proto.MaterialTypeResponse}
1600
+ */
1601
+ proto.MaterialTypeResponse.deserializeBinary = function(bytes) {
1602
+ var reader = new jspb.BinaryReader(bytes);
1603
+ var msg = new proto.MaterialTypeResponse;
1604
+ return proto.MaterialTypeResponse.deserializeBinaryFromReader(msg, reader);
1605
+ };
1606
+
1607
+
1608
+ /**
1609
+ * Deserializes binary data (in protobuf wire format) from the
1610
+ * given reader into the given message object.
1611
+ * @param {!proto.MaterialTypeResponse} msg The message object to deserialize into.
1612
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1613
+ * @return {!proto.MaterialTypeResponse}
1614
+ */
1615
+ proto.MaterialTypeResponse.deserializeBinaryFromReader = function(msg, reader) {
1616
+ while (reader.nextField()) {
1617
+ if (reader.isEndGroup()) {
1618
+ break;
1619
+ }
1620
+ var field = reader.getFieldNumber();
1621
+ switch (field) {
1622
+ case 1:
1623
+ var value = new proto.MaterialType;
1624
+ reader.readMessage(value,proto.MaterialType.deserializeBinaryFromReader);
1625
+ msg.setMaterialType(value);
1626
+ break;
1627
+ case 2:
1628
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1629
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1630
+ msg.setMeta(value);
1631
+ break;
1632
+ default:
1633
+ reader.skipField();
1634
+ break;
1635
+ }
1636
+ }
1637
+ return msg;
1638
+ };
1639
+
1640
+
1641
+ /**
1642
+ * Serializes the message to binary data (in protobuf wire format).
1643
+ * @return {!Uint8Array}
1644
+ */
1645
+ proto.MaterialTypeResponse.prototype.serializeBinary = function() {
1646
+ var writer = new jspb.BinaryWriter();
1647
+ proto.MaterialTypeResponse.serializeBinaryToWriter(this, writer);
1648
+ return writer.getResultBuffer();
1649
+ };
1650
+
1651
+
1652
+ /**
1653
+ * Serializes the given message to binary data (in protobuf wire
1654
+ * format), writing to the given BinaryWriter.
1655
+ * @param {!proto.MaterialTypeResponse} message
1656
+ * @param {!jspb.BinaryWriter} writer
1657
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1658
+ */
1659
+ proto.MaterialTypeResponse.serializeBinaryToWriter = function(message, writer) {
1660
+ var f = undefined;
1661
+ f = message.getMaterialType();
1662
+ if (f != null) {
1663
+ writer.writeMessage(
1664
+ 1,
1665
+ f,
1666
+ proto.MaterialType.serializeBinaryToWriter
1667
+ );
1668
+ }
1669
+ f = message.getMeta();
1670
+ if (f != null) {
1671
+ writer.writeMessage(
1672
+ 2,
1673
+ f,
1674
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1675
+ );
1676
+ }
1677
+ };
1678
+
1679
+
1680
+ /**
1681
+ * optional MaterialType material_type = 1;
1682
+ * @return {?proto.MaterialType}
1683
+ */
1684
+ proto.MaterialTypeResponse.prototype.getMaterialType = function() {
1685
+ return /** @type{?proto.MaterialType} */ (
1686
+ jspb.Message.getWrapperField(this, proto.MaterialType, 1));
1687
+ };
1688
+
1689
+
1690
+ /**
1691
+ * @param {?proto.MaterialType|undefined} value
1692
+ * @return {!proto.MaterialTypeResponse} returns this
1693
+ */
1694
+ proto.MaterialTypeResponse.prototype.setMaterialType = function(value) {
1695
+ return jspb.Message.setWrapperField(this, 1, value);
1696
+ };
1697
+
1698
+
1699
+ /**
1700
+ * Clears the message field making it undefined.
1701
+ * @return {!proto.MaterialTypeResponse} returns this
1702
+ */
1703
+ proto.MaterialTypeResponse.prototype.clearMaterialType = function() {
1704
+ return this.setMaterialType(undefined);
1705
+ };
1706
+
1707
+
1708
+ /**
1709
+ * Returns whether this field is set.
1710
+ * @return {boolean}
1711
+ */
1712
+ proto.MaterialTypeResponse.prototype.hasMaterialType = function() {
1713
+ return jspb.Message.getField(this, 1) != null;
1714
+ };
1715
+
1716
+
1717
+ /**
1718
+ * optional prisca.v1.global.meta.Meta meta = 2;
1719
+ * @return {?proto.prisca.v1.global.meta.Meta}
1720
+ */
1721
+ proto.MaterialTypeResponse.prototype.getMeta = function() {
1722
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1723
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1724
+ };
1725
+
1726
+
1727
+ /**
1728
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1729
+ * @return {!proto.MaterialTypeResponse} returns this
1730
+ */
1731
+ proto.MaterialTypeResponse.prototype.setMeta = function(value) {
1732
+ return jspb.Message.setWrapperField(this, 2, value);
1733
+ };
1734
+
1735
+
1736
+ /**
1737
+ * Clears the message field making it undefined.
1738
+ * @return {!proto.MaterialTypeResponse} returns this
1739
+ */
1740
+ proto.MaterialTypeResponse.prototype.clearMeta = function() {
1741
+ return this.setMeta(undefined);
1742
+ };
1743
+
1744
+
1745
+ /**
1746
+ * Returns whether this field is set.
1747
+ * @return {boolean}
1748
+ */
1749
+ proto.MaterialTypeResponse.prototype.hasMeta = function() {
1750
+ return jspb.Message.getField(this, 2) != null;
1751
+ };
1752
+
1753
+
1754
+
1755
+ /**
1756
+ * List of repeated fields within this message type.
1757
+ * @private {!Array<number>}
1758
+ * @const
1759
+ */
1760
+ proto.MaterialTypeListResponse.repeatedFields_ = [1];
1761
+
1762
+
1763
+
1764
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1765
+ /**
1766
+ * Creates an object representation of this proto.
1767
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1768
+ * Optional fields that are not set will be set to undefined.
1769
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1770
+ * For the list of reserved names please see:
1771
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1772
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1773
+ * JSPB instance for transitional soy proto support:
1774
+ * http://goto/soy-param-migration
1775
+ * @return {!Object}
1776
+ */
1777
+ proto.MaterialTypeListResponse.prototype.toObject = function(opt_includeInstance) {
1778
+ return proto.MaterialTypeListResponse.toObject(opt_includeInstance, this);
1779
+ };
1780
+
1781
+
1782
+ /**
1783
+ * Static version of the {@see toObject} method.
1784
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1785
+ * the JSPB instance for transitional soy proto support:
1786
+ * http://goto/soy-param-migration
1787
+ * @param {!proto.MaterialTypeListResponse} msg The msg instance to transform.
1788
+ * @return {!Object}
1789
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1790
+ */
1791
+ proto.MaterialTypeListResponse.toObject = function(includeInstance, msg) {
1792
+ var f, obj = {
1793
+ materialTypeList: jspb.Message.toObjectList(msg.getMaterialTypeList(),
1794
+ proto.MaterialType.toObject, includeInstance),
1795
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1796
+ };
1797
+
1798
+ if (includeInstance) {
1799
+ obj.$jspbMessageInstance = msg;
1800
+ }
1801
+ return obj;
1802
+ };
1803
+ }
1804
+
1805
+
1806
+ /**
1807
+ * Deserializes binary data (in protobuf wire format).
1808
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1809
+ * @return {!proto.MaterialTypeListResponse}
1810
+ */
1811
+ proto.MaterialTypeListResponse.deserializeBinary = function(bytes) {
1812
+ var reader = new jspb.BinaryReader(bytes);
1813
+ var msg = new proto.MaterialTypeListResponse;
1814
+ return proto.MaterialTypeListResponse.deserializeBinaryFromReader(msg, reader);
1815
+ };
1816
+
1817
+
1818
+ /**
1819
+ * Deserializes binary data (in protobuf wire format) from the
1820
+ * given reader into the given message object.
1821
+ * @param {!proto.MaterialTypeListResponse} msg The message object to deserialize into.
1822
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1823
+ * @return {!proto.MaterialTypeListResponse}
1824
+ */
1825
+ proto.MaterialTypeListResponse.deserializeBinaryFromReader = function(msg, reader) {
1826
+ while (reader.nextField()) {
1827
+ if (reader.isEndGroup()) {
1828
+ break;
1829
+ }
1830
+ var field = reader.getFieldNumber();
1831
+ switch (field) {
1832
+ case 1:
1833
+ var value = new proto.MaterialType;
1834
+ reader.readMessage(value,proto.MaterialType.deserializeBinaryFromReader);
1835
+ msg.addMaterialType(value);
1836
+ break;
1837
+ case 2:
1838
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1839
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1840
+ msg.setMeta(value);
1841
+ break;
1842
+ default:
1843
+ reader.skipField();
1844
+ break;
1845
+ }
1846
+ }
1847
+ return msg;
1848
+ };
1849
+
1850
+
1851
+ /**
1852
+ * Serializes the message to binary data (in protobuf wire format).
1853
+ * @return {!Uint8Array}
1854
+ */
1855
+ proto.MaterialTypeListResponse.prototype.serializeBinary = function() {
1856
+ var writer = new jspb.BinaryWriter();
1857
+ proto.MaterialTypeListResponse.serializeBinaryToWriter(this, writer);
1858
+ return writer.getResultBuffer();
1859
+ };
1860
+
1861
+
1862
+ /**
1863
+ * Serializes the given message to binary data (in protobuf wire
1864
+ * format), writing to the given BinaryWriter.
1865
+ * @param {!proto.MaterialTypeListResponse} message
1866
+ * @param {!jspb.BinaryWriter} writer
1867
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1868
+ */
1869
+ proto.MaterialTypeListResponse.serializeBinaryToWriter = function(message, writer) {
1870
+ var f = undefined;
1871
+ f = message.getMaterialTypeList();
1872
+ if (f.length > 0) {
1873
+ writer.writeRepeatedMessage(
1874
+ 1,
1875
+ f,
1876
+ proto.MaterialType.serializeBinaryToWriter
1877
+ );
1878
+ }
1879
+ f = message.getMeta();
1880
+ if (f != null) {
1881
+ writer.writeMessage(
1882
+ 2,
1883
+ f,
1884
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1885
+ );
1886
+ }
1887
+ };
1888
+
1889
+
1890
+ /**
1891
+ * repeated MaterialType material_type = 1;
1892
+ * @return {!Array<!proto.MaterialType>}
1893
+ */
1894
+ proto.MaterialTypeListResponse.prototype.getMaterialTypeList = function() {
1895
+ return /** @type{!Array<!proto.MaterialType>} */ (
1896
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialType, 1));
1897
+ };
1898
+
1899
+
1900
+ /**
1901
+ * @param {!Array<!proto.MaterialType>} value
1902
+ * @return {!proto.MaterialTypeListResponse} returns this
1903
+ */
1904
+ proto.MaterialTypeListResponse.prototype.setMaterialTypeList = function(value) {
1905
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1906
+ };
1907
+
1908
+
1909
+ /**
1910
+ * @param {!proto.MaterialType=} opt_value
1911
+ * @param {number=} opt_index
1912
+ * @return {!proto.MaterialType}
1913
+ */
1914
+ proto.MaterialTypeListResponse.prototype.addMaterialType = function(opt_value, opt_index) {
1915
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.MaterialType, opt_index);
1916
+ };
1917
+
1918
+
1919
+ /**
1920
+ * Clears the list making it empty but non-null.
1921
+ * @return {!proto.MaterialTypeListResponse} returns this
1922
+ */
1923
+ proto.MaterialTypeListResponse.prototype.clearMaterialTypeList = function() {
1924
+ return this.setMaterialTypeList([]);
1925
+ };
1926
+
1927
+
1928
+ /**
1929
+ * optional prisca.v1.global.meta.Meta meta = 2;
1930
+ * @return {?proto.prisca.v1.global.meta.Meta}
1931
+ */
1932
+ proto.MaterialTypeListResponse.prototype.getMeta = function() {
1933
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1934
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1935
+ };
1936
+
1937
+
1938
+ /**
1939
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1940
+ * @return {!proto.MaterialTypeListResponse} returns this
1941
+ */
1942
+ proto.MaterialTypeListResponse.prototype.setMeta = function(value) {
1943
+ return jspb.Message.setWrapperField(this, 2, value);
1944
+ };
1945
+
1946
+
1947
+ /**
1948
+ * Clears the message field making it undefined.
1949
+ * @return {!proto.MaterialTypeListResponse} returns this
1950
+ */
1951
+ proto.MaterialTypeListResponse.prototype.clearMeta = function() {
1952
+ return this.setMeta(undefined);
1953
+ };
1954
+
1955
+
1956
+ /**
1957
+ * Returns whether this field is set.
1958
+ * @return {boolean}
1959
+ */
1960
+ proto.MaterialTypeListResponse.prototype.hasMeta = function() {
1961
+ return jspb.Message.getField(this, 2) != null;
1962
+ };
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1969
+ /**
1970
+ * Creates an object representation of this proto.
1971
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1972
+ * Optional fields that are not set will be set to undefined.
1973
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1974
+ * For the list of reserved names please see:
1975
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1976
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1977
+ * JSPB instance for transitional soy proto support:
1978
+ * http://goto/soy-param-migration
1979
+ * @return {!Object}
1980
+ */
1981
+ proto.MaterialTypeGetByIdResponse.prototype.toObject = function(opt_includeInstance) {
1982
+ return proto.MaterialTypeGetByIdResponse.toObject(opt_includeInstance, this);
1983
+ };
1984
+
1985
+
1986
+ /**
1987
+ * Static version of the {@see toObject} method.
1988
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1989
+ * the JSPB instance for transitional soy proto support:
1990
+ * http://goto/soy-param-migration
1991
+ * @param {!proto.MaterialTypeGetByIdResponse} msg The msg instance to transform.
1992
+ * @return {!Object}
1993
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1994
+ */
1995
+ proto.MaterialTypeGetByIdResponse.toObject = function(includeInstance, msg) {
1996
+ var f, obj = {
1997
+ materialType: (f = msg.getMaterialType()) && proto.MaterialType.toObject(includeInstance, f),
1998
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1999
+ };
2000
+
2001
+ if (includeInstance) {
2002
+ obj.$jspbMessageInstance = msg;
2003
+ }
2004
+ return obj;
2005
+ };
2006
+ }
2007
+
2008
+
2009
+ /**
2010
+ * Deserializes binary data (in protobuf wire format).
2011
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2012
+ * @return {!proto.MaterialTypeGetByIdResponse}
2013
+ */
2014
+ proto.MaterialTypeGetByIdResponse.deserializeBinary = function(bytes) {
2015
+ var reader = new jspb.BinaryReader(bytes);
2016
+ var msg = new proto.MaterialTypeGetByIdResponse;
2017
+ return proto.MaterialTypeGetByIdResponse.deserializeBinaryFromReader(msg, reader);
2018
+ };
2019
+
2020
+
2021
+ /**
2022
+ * Deserializes binary data (in protobuf wire format) from the
2023
+ * given reader into the given message object.
2024
+ * @param {!proto.MaterialTypeGetByIdResponse} msg The message object to deserialize into.
2025
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2026
+ * @return {!proto.MaterialTypeGetByIdResponse}
2027
+ */
2028
+ proto.MaterialTypeGetByIdResponse.deserializeBinaryFromReader = function(msg, reader) {
2029
+ while (reader.nextField()) {
2030
+ if (reader.isEndGroup()) {
2031
+ break;
2032
+ }
2033
+ var field = reader.getFieldNumber();
2034
+ switch (field) {
2035
+ case 1:
2036
+ var value = new proto.MaterialType;
2037
+ reader.readMessage(value,proto.MaterialType.deserializeBinaryFromReader);
2038
+ msg.setMaterialType(value);
2039
+ break;
2040
+ case 2:
2041
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
2042
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
2043
+ msg.setMeta(value);
2044
+ break;
2045
+ default:
2046
+ reader.skipField();
2047
+ break;
2048
+ }
2049
+ }
2050
+ return msg;
2051
+ };
2052
+
2053
+
2054
+ /**
2055
+ * Serializes the message to binary data (in protobuf wire format).
2056
+ * @return {!Uint8Array}
2057
+ */
2058
+ proto.MaterialTypeGetByIdResponse.prototype.serializeBinary = function() {
2059
+ var writer = new jspb.BinaryWriter();
2060
+ proto.MaterialTypeGetByIdResponse.serializeBinaryToWriter(this, writer);
2061
+ return writer.getResultBuffer();
2062
+ };
2063
+
2064
+
2065
+ /**
2066
+ * Serializes the given message to binary data (in protobuf wire
2067
+ * format), writing to the given BinaryWriter.
2068
+ * @param {!proto.MaterialTypeGetByIdResponse} message
2069
+ * @param {!jspb.BinaryWriter} writer
2070
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2071
+ */
2072
+ proto.MaterialTypeGetByIdResponse.serializeBinaryToWriter = function(message, writer) {
2073
+ var f = undefined;
2074
+ f = message.getMaterialType();
2075
+ if (f != null) {
2076
+ writer.writeMessage(
2077
+ 1,
2078
+ f,
2079
+ proto.MaterialType.serializeBinaryToWriter
2080
+ );
2081
+ }
2082
+ f = message.getMeta();
2083
+ if (f != null) {
2084
+ writer.writeMessage(
2085
+ 2,
2086
+ f,
2087
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
2088
+ );
2089
+ }
2090
+ };
2091
+
2092
+
2093
+ /**
2094
+ * optional MaterialType material_type = 1;
2095
+ * @return {?proto.MaterialType}
2096
+ */
2097
+ proto.MaterialTypeGetByIdResponse.prototype.getMaterialType = function() {
2098
+ return /** @type{?proto.MaterialType} */ (
2099
+ jspb.Message.getWrapperField(this, proto.MaterialType, 1));
2100
+ };
2101
+
2102
+
2103
+ /**
2104
+ * @param {?proto.MaterialType|undefined} value
2105
+ * @return {!proto.MaterialTypeGetByIdResponse} returns this
2106
+ */
2107
+ proto.MaterialTypeGetByIdResponse.prototype.setMaterialType = function(value) {
2108
+ return jspb.Message.setWrapperField(this, 1, value);
2109
+ };
2110
+
2111
+
2112
+ /**
2113
+ * Clears the message field making it undefined.
2114
+ * @return {!proto.MaterialTypeGetByIdResponse} returns this
2115
+ */
2116
+ proto.MaterialTypeGetByIdResponse.prototype.clearMaterialType = function() {
2117
+ return this.setMaterialType(undefined);
2118
+ };
2119
+
2120
+
2121
+ /**
2122
+ * Returns whether this field is set.
2123
+ * @return {boolean}
2124
+ */
2125
+ proto.MaterialTypeGetByIdResponse.prototype.hasMaterialType = function() {
2126
+ return jspb.Message.getField(this, 1) != null;
2127
+ };
2128
+
2129
+
2130
+ /**
2131
+ * optional prisca.v1.global.meta.Meta meta = 2;
2132
+ * @return {?proto.prisca.v1.global.meta.Meta}
2133
+ */
2134
+ proto.MaterialTypeGetByIdResponse.prototype.getMeta = function() {
2135
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
2136
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
2137
+ };
2138
+
2139
+
2140
+ /**
2141
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
2142
+ * @return {!proto.MaterialTypeGetByIdResponse} returns this
2143
+ */
2144
+ proto.MaterialTypeGetByIdResponse.prototype.setMeta = function(value) {
2145
+ return jspb.Message.setWrapperField(this, 2, value);
2146
+ };
2147
+
2148
+
2149
+ /**
2150
+ * Clears the message field making it undefined.
2151
+ * @return {!proto.MaterialTypeGetByIdResponse} returns this
2152
+ */
2153
+ proto.MaterialTypeGetByIdResponse.prototype.clearMeta = function() {
2154
+ return this.setMeta(undefined);
2155
+ };
2156
+
2157
+
2158
+ /**
2159
+ * Returns whether this field is set.
2160
+ * @return {boolean}
2161
+ */
2162
+ proto.MaterialTypeGetByIdResponse.prototype.hasMeta = function() {
2163
+ return jspb.Message.getField(this, 2) != null;
2164
+ };
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2171
+ /**
2172
+ * Creates an object representation of this proto.
2173
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2174
+ * Optional fields that are not set will be set to undefined.
2175
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2176
+ * For the list of reserved names please see:
2177
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2178
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2179
+ * JSPB instance for transitional soy proto support:
2180
+ * http://goto/soy-param-migration
2181
+ * @return {!Object}
2182
+ */
2183
+ proto.MaterialTypeUpdateResponse.prototype.toObject = function(opt_includeInstance) {
2184
+ return proto.MaterialTypeUpdateResponse.toObject(opt_includeInstance, this);
2185
+ };
2186
+
2187
+
2188
+ /**
2189
+ * Static version of the {@see toObject} method.
2190
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2191
+ * the JSPB instance for transitional soy proto support:
2192
+ * http://goto/soy-param-migration
2193
+ * @param {!proto.MaterialTypeUpdateResponse} msg The msg instance to transform.
2194
+ * @return {!Object}
2195
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2196
+ */
2197
+ proto.MaterialTypeUpdateResponse.toObject = function(includeInstance, msg) {
2198
+ var f, obj = {
2199
+ materialType: (f = msg.getMaterialType()) && proto.MaterialType.toObject(includeInstance, f),
2200
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
2201
+ };
2202
+
2203
+ if (includeInstance) {
2204
+ obj.$jspbMessageInstance = msg;
2205
+ }
2206
+ return obj;
2207
+ };
2208
+ }
2209
+
2210
+
2211
+ /**
2212
+ * Deserializes binary data (in protobuf wire format).
2213
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2214
+ * @return {!proto.MaterialTypeUpdateResponse}
2215
+ */
2216
+ proto.MaterialTypeUpdateResponse.deserializeBinary = function(bytes) {
2217
+ var reader = new jspb.BinaryReader(bytes);
2218
+ var msg = new proto.MaterialTypeUpdateResponse;
2219
+ return proto.MaterialTypeUpdateResponse.deserializeBinaryFromReader(msg, reader);
2220
+ };
2221
+
2222
+
2223
+ /**
2224
+ * Deserializes binary data (in protobuf wire format) from the
2225
+ * given reader into the given message object.
2226
+ * @param {!proto.MaterialTypeUpdateResponse} msg The message object to deserialize into.
2227
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2228
+ * @return {!proto.MaterialTypeUpdateResponse}
2229
+ */
2230
+ proto.MaterialTypeUpdateResponse.deserializeBinaryFromReader = function(msg, reader) {
2231
+ while (reader.nextField()) {
2232
+ if (reader.isEndGroup()) {
2233
+ break;
2234
+ }
2235
+ var field = reader.getFieldNumber();
2236
+ switch (field) {
2237
+ case 1:
2238
+ var value = new proto.MaterialType;
2239
+ reader.readMessage(value,proto.MaterialType.deserializeBinaryFromReader);
2240
+ msg.setMaterialType(value);
2241
+ break;
2242
+ case 2:
2243
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
2244
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
2245
+ msg.setMeta(value);
2246
+ break;
2247
+ default:
2248
+ reader.skipField();
2249
+ break;
2250
+ }
2251
+ }
2252
+ return msg;
2253
+ };
2254
+
2255
+
2256
+ /**
2257
+ * Serializes the message to binary data (in protobuf wire format).
2258
+ * @return {!Uint8Array}
2259
+ */
2260
+ proto.MaterialTypeUpdateResponse.prototype.serializeBinary = function() {
2261
+ var writer = new jspb.BinaryWriter();
2262
+ proto.MaterialTypeUpdateResponse.serializeBinaryToWriter(this, writer);
2263
+ return writer.getResultBuffer();
2264
+ };
2265
+
2266
+
2267
+ /**
2268
+ * Serializes the given message to binary data (in protobuf wire
2269
+ * format), writing to the given BinaryWriter.
2270
+ * @param {!proto.MaterialTypeUpdateResponse} message
2271
+ * @param {!jspb.BinaryWriter} writer
2272
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2273
+ */
2274
+ proto.MaterialTypeUpdateResponse.serializeBinaryToWriter = function(message, writer) {
2275
+ var f = undefined;
2276
+ f = message.getMaterialType();
2277
+ if (f != null) {
2278
+ writer.writeMessage(
2279
+ 1,
2280
+ f,
2281
+ proto.MaterialType.serializeBinaryToWriter
2282
+ );
2283
+ }
2284
+ f = message.getMeta();
2285
+ if (f != null) {
2286
+ writer.writeMessage(
2287
+ 2,
2288
+ f,
2289
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
2290
+ );
2291
+ }
2292
+ };
2293
+
2294
+
2295
+ /**
2296
+ * optional MaterialType material_type = 1;
2297
+ * @return {?proto.MaterialType}
2298
+ */
2299
+ proto.MaterialTypeUpdateResponse.prototype.getMaterialType = function() {
2300
+ return /** @type{?proto.MaterialType} */ (
2301
+ jspb.Message.getWrapperField(this, proto.MaterialType, 1));
2302
+ };
2303
+
2304
+
2305
+ /**
2306
+ * @param {?proto.MaterialType|undefined} value
2307
+ * @return {!proto.MaterialTypeUpdateResponse} returns this
2308
+ */
2309
+ proto.MaterialTypeUpdateResponse.prototype.setMaterialType = function(value) {
2310
+ return jspb.Message.setWrapperField(this, 1, value);
2311
+ };
2312
+
2313
+
2314
+ /**
2315
+ * Clears the message field making it undefined.
2316
+ * @return {!proto.MaterialTypeUpdateResponse} returns this
2317
+ */
2318
+ proto.MaterialTypeUpdateResponse.prototype.clearMaterialType = function() {
2319
+ return this.setMaterialType(undefined);
2320
+ };
2321
+
2322
+
2323
+ /**
2324
+ * Returns whether this field is set.
2325
+ * @return {boolean}
2326
+ */
2327
+ proto.MaterialTypeUpdateResponse.prototype.hasMaterialType = function() {
2328
+ return jspb.Message.getField(this, 1) != null;
2329
+ };
2330
+
2331
+
2332
+ /**
2333
+ * optional prisca.v1.global.meta.Meta meta = 2;
2334
+ * @return {?proto.prisca.v1.global.meta.Meta}
2335
+ */
2336
+ proto.MaterialTypeUpdateResponse.prototype.getMeta = function() {
2337
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
2338
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
2339
+ };
2340
+
2341
+
2342
+ /**
2343
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
2344
+ * @return {!proto.MaterialTypeUpdateResponse} returns this
2345
+ */
2346
+ proto.MaterialTypeUpdateResponse.prototype.setMeta = function(value) {
2347
+ return jspb.Message.setWrapperField(this, 2, value);
2348
+ };
2349
+
2350
+
2351
+ /**
2352
+ * Clears the message field making it undefined.
2353
+ * @return {!proto.MaterialTypeUpdateResponse} returns this
2354
+ */
2355
+ proto.MaterialTypeUpdateResponse.prototype.clearMeta = function() {
2356
+ return this.setMeta(undefined);
2357
+ };
2358
+
2359
+
2360
+ /**
2361
+ * Returns whether this field is set.
2362
+ * @return {boolean}
2363
+ */
2364
+ proto.MaterialTypeUpdateResponse.prototype.hasMeta = function() {
2365
+ return jspb.Message.getField(this, 2) != null;
2366
+ };
2367
+
2368
+
2369
+ goog.object.extend(exports, proto);