@aldiokta/protocgen 1.0.32 → 1.0.34

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