@aldiokta/protocgen 1.0.20 → 1.0.22

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 (96) hide show
  1. package/package.json +1 -1
  2. package/prisca/v1/core/auth/auth_grpc_pb.js +256 -0
  3. package/prisca/v1/core/auth/auth_pb.js +2801 -0
  4. package/prisca/v1/core/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 +3582 -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 +276 -0
  15. package/prisca/v1/core/location/location_pb.js +4334 -0
  16. package/prisca/v1/core/material/material_grpc_pb.js +181 -0
  17. package/prisca/v1/core/material/material_pb.js +4046 -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/transaction_builder/transaction_builder_grpc_pb.js +421 -0
  35. package/prisca/v1/core/transaction_builder/transaction_builder_pb.js +9597 -0
  36. package/prisca/v1/core/unit_of_measurement/unit_of_measurement_grpc_pb.js +180 -0
  37. package/prisca/v1/core/unit_of_measurement/unit_of_measurement_pb.js +2798 -0
  38. package/prisca/v1/core/users/users_grpc_pb.js +1 -0
  39. package/prisca/v1/core/users/users_pb.js +626 -0
  40. package/prisca/v1/core/users_role/users_role_grpc_pb.js +177 -0
  41. package/prisca/v1/core/users_role/users_role_pb.js +2372 -0
  42. package/prisca/v1/core/work_location/work_location_grpc_pb.js +179 -0
  43. package/prisca/v1/core/work_location/work_location_pb.js +3972 -0
  44. package/prisca/v1/core/workflow/workflow_grpc_pb.js +179 -0
  45. package/prisca/v1/core/workflow/workflow_pb.js +6318 -0
  46. package/prisca/v1/global/meta/meta_grpc_pb.js +1 -0
  47. package/prisca/v1/global/meta/meta_pb.js +1179 -0
  48. package/prisca/v1/core/auth/auth.pb.go +0 -998
  49. package/prisca/v1/core/auth/auth_grpc.pb.go +0 -427
  50. package/prisca/v1/core/company/company.pb.go +0 -965
  51. package/prisca/v1/core/company/company_grpc.pb.go +0 -273
  52. package/prisca/v1/core/department_material/department_material.pb.go +0 -776
  53. package/prisca/v1/core/department_material/department_material_grpc.pb.go +0 -236
  54. package/prisca/v1/core/job_grade/job_grade.pb.go +0 -887
  55. package/prisca/v1/core/job_grade/job_grade_grpc.pb.go +0 -273
  56. package/prisca/v1/core/job_position/job_position.pb.go +0 -1196
  57. package/prisca/v1/core/job_position/job_position_grpc.pb.go +0 -273
  58. package/prisca/v1/core/job_title/job_title.pb.go +0 -986
  59. package/prisca/v1/core/job_title/job_title_grpc.pb.go +0 -273
  60. package/prisca/v1/core/line_of_approval/line_of_approval.pb.go +0 -913
  61. package/prisca/v1/core/line_of_approval/line_of_approval_grpc.pb.go +0 -273
  62. package/prisca/v1/core/location/location.pb.go +0 -1397
  63. package/prisca/v1/core/location/location_grpc.pb.go +0 -387
  64. package/prisca/v1/core/material/material.pb.go +0 -1366
  65. package/prisca/v1/core/material/material_grpc.pb.go +0 -273
  66. package/prisca/v1/core/material_group/material_group.pb.go +0 -911
  67. package/prisca/v1/core/material_group/material_group_grpc.pb.go +0 -273
  68. package/prisca/v1/core/material_type/material_type.pb.go +0 -827
  69. package/prisca/v1/core/material_type/material_type_grpc.pb.go +0 -239
  70. package/prisca/v1/core/number_range/number_range.pb.go +0 -916
  71. package/prisca/v1/core/number_range/number_range_grpc.pb.go +0 -273
  72. package/prisca/v1/core/organization/organization.pb.go +0 -1039
  73. package/prisca/v1/core/organization/organization_grpc.pb.go +0 -273
  74. package/prisca/v1/core/organization_level/organization_level.pb.go +0 -853
  75. package/prisca/v1/core/organization_level/organization_level_grpc.pb.go +0 -274
  76. package/prisca/v1/core/procurement/procurement.pb.go +0 -622
  77. package/prisca/v1/core/procurement/procurement_grpc.pb.go +0 -275
  78. package/prisca/v1/core/purchase_requisition_trx/purchase_requisition_trx.pb.go +0 -1550
  79. package/prisca/v1/core/purchase_requisition_trx/purchase_requisition_trx_grpc.pb.go +0 -388
  80. package/prisca/v1/core/recipient_roles/recipient_roles.pb.go +0 -141
  81. package/prisca/v1/core/role/role.pb.go +0 -797
  82. package/prisca/v1/core/role/role_grpc.pb.go +0 -273
  83. package/prisca/v1/core/transaction_builder/transaction_builder.pb.go +0 -3217
  84. package/prisca/v1/core/transaction_builder/transaction_builder_grpc.pb.go +0 -656
  85. package/prisca/v1/core/unit_of_measurement/unit_of_measurement.pb.go +0 -973
  86. package/prisca/v1/core/unit_of_measurement/unit_of_measurement_grpc.pb.go +0 -278
  87. package/prisca/v1/core/users/users.pb.go +0 -281
  88. package/prisca/v1/core/users_role/users_role.pb.go +0 -813
  89. package/prisca/v1/core/users_role/users_role_grpc.pb.go +0 -273
  90. package/prisca/v1/core/work_location/work_location.pb.go +0 -995
  91. package/prisca/v1/core/work_location/work_location_grpc.pb.go +0 -273
  92. package/prisca/v1/core/work_locations/work_locations.pb.go +0 -184
  93. package/prisca/v1/core/work_locations/work_locations_grpc.pb.go +0 -76
  94. package/prisca/v1/core/workflow/workflow.pb.go +0 -2057
  95. package/prisca/v1/core/workflow/workflow_grpc.pb.go +0 -273
  96. package/prisca/v1/global/meta/meta.pb.go +0 -446
@@ -0,0 +1,4046 @@
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
+ };
1398
+
1399
+ if (includeInstance) {
1400
+ obj.$jspbMessageInstance = msg;
1401
+ }
1402
+ return obj;
1403
+ };
1404
+ }
1405
+
1406
+
1407
+ /**
1408
+ * Deserializes binary data (in protobuf wire format).
1409
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1410
+ * @return {!proto.MaterialUOM}
1411
+ */
1412
+ proto.MaterialUOM.deserializeBinary = function(bytes) {
1413
+ var reader = new jspb.BinaryReader(bytes);
1414
+ var msg = new proto.MaterialUOM;
1415
+ return proto.MaterialUOM.deserializeBinaryFromReader(msg, reader);
1416
+ };
1417
+
1418
+
1419
+ /**
1420
+ * Deserializes binary data (in protobuf wire format) from the
1421
+ * given reader into the given message object.
1422
+ * @param {!proto.MaterialUOM} msg The message object to deserialize into.
1423
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1424
+ * @return {!proto.MaterialUOM}
1425
+ */
1426
+ proto.MaterialUOM.deserializeBinaryFromReader = function(msg, reader) {
1427
+ while (reader.nextField()) {
1428
+ if (reader.isEndGroup()) {
1429
+ break;
1430
+ }
1431
+ var field = reader.getFieldNumber();
1432
+ switch (field) {
1433
+ case 1:
1434
+ var value = /** @type {number} */ (reader.readInt64());
1435
+ msg.setMaterialId(value);
1436
+ break;
1437
+ case 2:
1438
+ var value = /** @type {number} */ (reader.readInt64());
1439
+ msg.setUomId(value);
1440
+ break;
1441
+ case 3:
1442
+ var value = /** @type {string} */ (reader.readString());
1443
+ msg.setUnitConversion(value);
1444
+ break;
1445
+ case 4:
1446
+ var value = /** @type {string} */ (reader.readString());
1447
+ msg.setUnit(value);
1448
+ break;
1449
+ default:
1450
+ reader.skipField();
1451
+ break;
1452
+ }
1453
+ }
1454
+ return msg;
1455
+ };
1456
+
1457
+
1458
+ /**
1459
+ * Serializes the message to binary data (in protobuf wire format).
1460
+ * @return {!Uint8Array}
1461
+ */
1462
+ proto.MaterialUOM.prototype.serializeBinary = function() {
1463
+ var writer = new jspb.BinaryWriter();
1464
+ proto.MaterialUOM.serializeBinaryToWriter(this, writer);
1465
+ return writer.getResultBuffer();
1466
+ };
1467
+
1468
+
1469
+ /**
1470
+ * Serializes the given message to binary data (in protobuf wire
1471
+ * format), writing to the given BinaryWriter.
1472
+ * @param {!proto.MaterialUOM} message
1473
+ * @param {!jspb.BinaryWriter} writer
1474
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1475
+ */
1476
+ proto.MaterialUOM.serializeBinaryToWriter = function(message, writer) {
1477
+ var f = undefined;
1478
+ f = message.getMaterialId();
1479
+ if (f !== 0) {
1480
+ writer.writeInt64(
1481
+ 1,
1482
+ f
1483
+ );
1484
+ }
1485
+ f = message.getUomId();
1486
+ if (f !== 0) {
1487
+ writer.writeInt64(
1488
+ 2,
1489
+ f
1490
+ );
1491
+ }
1492
+ f = message.getUnitConversion();
1493
+ if (f.length > 0) {
1494
+ writer.writeString(
1495
+ 3,
1496
+ f
1497
+ );
1498
+ }
1499
+ f = message.getUnit();
1500
+ if (f.length > 0) {
1501
+ writer.writeString(
1502
+ 4,
1503
+ f
1504
+ );
1505
+ }
1506
+ };
1507
+
1508
+
1509
+ /**
1510
+ * optional int64 material_id = 1;
1511
+ * @return {number}
1512
+ */
1513
+ proto.MaterialUOM.prototype.getMaterialId = function() {
1514
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1515
+ };
1516
+
1517
+
1518
+ /**
1519
+ * @param {number} value
1520
+ * @return {!proto.MaterialUOM} returns this
1521
+ */
1522
+ proto.MaterialUOM.prototype.setMaterialId = function(value) {
1523
+ return jspb.Message.setProto3IntField(this, 1, value);
1524
+ };
1525
+
1526
+
1527
+ /**
1528
+ * optional int64 uom_id = 2;
1529
+ * @return {number}
1530
+ */
1531
+ proto.MaterialUOM.prototype.getUomId = function() {
1532
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1533
+ };
1534
+
1535
+
1536
+ /**
1537
+ * @param {number} value
1538
+ * @return {!proto.MaterialUOM} returns this
1539
+ */
1540
+ proto.MaterialUOM.prototype.setUomId = function(value) {
1541
+ return jspb.Message.setProto3IntField(this, 2, value);
1542
+ };
1543
+
1544
+
1545
+ /**
1546
+ * optional string unit_conversion = 3;
1547
+ * @return {string}
1548
+ */
1549
+ proto.MaterialUOM.prototype.getUnitConversion = function() {
1550
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1551
+ };
1552
+
1553
+
1554
+ /**
1555
+ * @param {string} value
1556
+ * @return {!proto.MaterialUOM} returns this
1557
+ */
1558
+ proto.MaterialUOM.prototype.setUnitConversion = function(value) {
1559
+ return jspb.Message.setProto3StringField(this, 3, value);
1560
+ };
1561
+
1562
+
1563
+ /**
1564
+ * optional string unit = 4;
1565
+ * @return {string}
1566
+ */
1567
+ proto.MaterialUOM.prototype.getUnit = function() {
1568
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1569
+ };
1570
+
1571
+
1572
+ /**
1573
+ * @param {string} value
1574
+ * @return {!proto.MaterialUOM} returns this
1575
+ */
1576
+ proto.MaterialUOM.prototype.setUnit = function(value) {
1577
+ return jspb.Message.setProto3StringField(this, 4, value);
1578
+ };
1579
+
1580
+
1581
+
1582
+
1583
+
1584
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1585
+ /**
1586
+ * Creates an object representation of this proto.
1587
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1588
+ * Optional fields that are not set will be set to undefined.
1589
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1590
+ * For the list of reserved names please see:
1591
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1592
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1593
+ * JSPB instance for transitional soy proto support:
1594
+ * http://goto/soy-param-migration
1595
+ * @return {!Object}
1596
+ */
1597
+ proto.MaterialUOMRequest.prototype.toObject = function(opt_includeInstance) {
1598
+ return proto.MaterialUOMRequest.toObject(opt_includeInstance, this);
1599
+ };
1600
+
1601
+
1602
+ /**
1603
+ * Static version of the {@see toObject} method.
1604
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1605
+ * the JSPB instance for transitional soy proto support:
1606
+ * http://goto/soy-param-migration
1607
+ * @param {!proto.MaterialUOMRequest} msg The msg instance to transform.
1608
+ * @return {!Object}
1609
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1610
+ */
1611
+ proto.MaterialUOMRequest.toObject = function(includeInstance, msg) {
1612
+ var f, obj = {
1613
+ uomReferencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1614
+ unitConversion: jspb.Message.getFieldWithDefault(msg, 2, "")
1615
+ };
1616
+
1617
+ if (includeInstance) {
1618
+ obj.$jspbMessageInstance = msg;
1619
+ }
1620
+ return obj;
1621
+ };
1622
+ }
1623
+
1624
+
1625
+ /**
1626
+ * Deserializes binary data (in protobuf wire format).
1627
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1628
+ * @return {!proto.MaterialUOMRequest}
1629
+ */
1630
+ proto.MaterialUOMRequest.deserializeBinary = function(bytes) {
1631
+ var reader = new jspb.BinaryReader(bytes);
1632
+ var msg = new proto.MaterialUOMRequest;
1633
+ return proto.MaterialUOMRequest.deserializeBinaryFromReader(msg, reader);
1634
+ };
1635
+
1636
+
1637
+ /**
1638
+ * Deserializes binary data (in protobuf wire format) from the
1639
+ * given reader into the given message object.
1640
+ * @param {!proto.MaterialUOMRequest} msg The message object to deserialize into.
1641
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1642
+ * @return {!proto.MaterialUOMRequest}
1643
+ */
1644
+ proto.MaterialUOMRequest.deserializeBinaryFromReader = function(msg, reader) {
1645
+ while (reader.nextField()) {
1646
+ if (reader.isEndGroup()) {
1647
+ break;
1648
+ }
1649
+ var field = reader.getFieldNumber();
1650
+ switch (field) {
1651
+ case 1:
1652
+ var value = /** @type {string} */ (reader.readString());
1653
+ msg.setUomReferencesId(value);
1654
+ break;
1655
+ case 2:
1656
+ var value = /** @type {string} */ (reader.readString());
1657
+ msg.setUnitConversion(value);
1658
+ break;
1659
+ default:
1660
+ reader.skipField();
1661
+ break;
1662
+ }
1663
+ }
1664
+ return msg;
1665
+ };
1666
+
1667
+
1668
+ /**
1669
+ * Serializes the message to binary data (in protobuf wire format).
1670
+ * @return {!Uint8Array}
1671
+ */
1672
+ proto.MaterialUOMRequest.prototype.serializeBinary = function() {
1673
+ var writer = new jspb.BinaryWriter();
1674
+ proto.MaterialUOMRequest.serializeBinaryToWriter(this, writer);
1675
+ return writer.getResultBuffer();
1676
+ };
1677
+
1678
+
1679
+ /**
1680
+ * Serializes the given message to binary data (in protobuf wire
1681
+ * format), writing to the given BinaryWriter.
1682
+ * @param {!proto.MaterialUOMRequest} message
1683
+ * @param {!jspb.BinaryWriter} writer
1684
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1685
+ */
1686
+ proto.MaterialUOMRequest.serializeBinaryToWriter = function(message, writer) {
1687
+ var f = undefined;
1688
+ f = message.getUomReferencesId();
1689
+ if (f.length > 0) {
1690
+ writer.writeString(
1691
+ 1,
1692
+ f
1693
+ );
1694
+ }
1695
+ f = message.getUnitConversion();
1696
+ if (f.length > 0) {
1697
+ writer.writeString(
1698
+ 2,
1699
+ f
1700
+ );
1701
+ }
1702
+ };
1703
+
1704
+
1705
+ /**
1706
+ * optional string uom_references_id = 1;
1707
+ * @return {string}
1708
+ */
1709
+ proto.MaterialUOMRequest.prototype.getUomReferencesId = function() {
1710
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1711
+ };
1712
+
1713
+
1714
+ /**
1715
+ * @param {string} value
1716
+ * @return {!proto.MaterialUOMRequest} returns this
1717
+ */
1718
+ proto.MaterialUOMRequest.prototype.setUomReferencesId = function(value) {
1719
+ return jspb.Message.setProto3StringField(this, 1, value);
1720
+ };
1721
+
1722
+
1723
+ /**
1724
+ * optional string unit_conversion = 2;
1725
+ * @return {string}
1726
+ */
1727
+ proto.MaterialUOMRequest.prototype.getUnitConversion = function() {
1728
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1729
+ };
1730
+
1731
+
1732
+ /**
1733
+ * @param {string} value
1734
+ * @return {!proto.MaterialUOMRequest} returns this
1735
+ */
1736
+ proto.MaterialUOMRequest.prototype.setUnitConversion = function(value) {
1737
+ return jspb.Message.setProto3StringField(this, 2, value);
1738
+ };
1739
+
1740
+
1741
+
1742
+ /**
1743
+ * List of repeated fields within this message type.
1744
+ * @private {!Array<number>}
1745
+ * @const
1746
+ */
1747
+ proto.BaseMaterialRequest.repeatedFields_ = [7,8];
1748
+
1749
+
1750
+
1751
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1752
+ /**
1753
+ * Creates an object representation of this proto.
1754
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1755
+ * Optional fields that are not set will be set to undefined.
1756
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1757
+ * For the list of reserved names please see:
1758
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1759
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1760
+ * JSPB instance for transitional soy proto support:
1761
+ * http://goto/soy-param-migration
1762
+ * @return {!Object}
1763
+ */
1764
+ proto.BaseMaterialRequest.prototype.toObject = function(opt_includeInstance) {
1765
+ return proto.BaseMaterialRequest.toObject(opt_includeInstance, this);
1766
+ };
1767
+
1768
+
1769
+ /**
1770
+ * Static version of the {@see toObject} method.
1771
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1772
+ * the JSPB instance for transitional soy proto support:
1773
+ * http://goto/soy-param-migration
1774
+ * @param {!proto.BaseMaterialRequest} msg The msg instance to transform.
1775
+ * @return {!Object}
1776
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1777
+ */
1778
+ proto.BaseMaterialRequest.toObject = function(includeInstance, msg) {
1779
+ var f, obj = {
1780
+ materialCode: jspb.Message.getFieldWithDefault(msg, 1, ""),
1781
+ materialTypeCodeRef: jspb.Message.getFieldWithDefault(msg, 2, ""),
1782
+ materialDescription: jspb.Message.getFieldWithDefault(msg, 3, ""),
1783
+ materialCategory: jspb.Message.getFieldWithDefault(msg, 4, ""),
1784
+ oldProductNumber: jspb.Message.getFieldWithDefault(msg, 5, 0),
1785
+ materialGroupRef: jspb.Message.getFieldWithDefault(msg, 6, ""),
1786
+ languageDescriptionList: jspb.Message.toObjectList(msg.getLanguageDescriptionList(),
1787
+ proto.MaterialLanguageDescription.toObject, includeInstance),
1788
+ unitOfMeasureList: jspb.Message.toObjectList(msg.getUnitOfMeasureList(),
1789
+ proto.MaterialUOMRequest.toObject, includeInstance),
1790
+ createdBy: jspb.Message.getFieldWithDefault(msg, 9, ""),
1791
+ updatedBy: jspb.Message.getFieldWithDefault(msg, 10, ""),
1792
+ materialPlantRef: jspb.Message.getFieldWithDefault(msg, 11, ""),
1793
+ baseUnitOfMeasureRef: jspb.Message.getFieldWithDefault(msg, 12, "")
1794
+ };
1795
+
1796
+ if (includeInstance) {
1797
+ obj.$jspbMessageInstance = msg;
1798
+ }
1799
+ return obj;
1800
+ };
1801
+ }
1802
+
1803
+
1804
+ /**
1805
+ * Deserializes binary data (in protobuf wire format).
1806
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1807
+ * @return {!proto.BaseMaterialRequest}
1808
+ */
1809
+ proto.BaseMaterialRequest.deserializeBinary = function(bytes) {
1810
+ var reader = new jspb.BinaryReader(bytes);
1811
+ var msg = new proto.BaseMaterialRequest;
1812
+ return proto.BaseMaterialRequest.deserializeBinaryFromReader(msg, reader);
1813
+ };
1814
+
1815
+
1816
+ /**
1817
+ * Deserializes binary data (in protobuf wire format) from the
1818
+ * given reader into the given message object.
1819
+ * @param {!proto.BaseMaterialRequest} msg The message object to deserialize into.
1820
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1821
+ * @return {!proto.BaseMaterialRequest}
1822
+ */
1823
+ proto.BaseMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
1824
+ while (reader.nextField()) {
1825
+ if (reader.isEndGroup()) {
1826
+ break;
1827
+ }
1828
+ var field = reader.getFieldNumber();
1829
+ switch (field) {
1830
+ case 1:
1831
+ var value = /** @type {string} */ (reader.readString());
1832
+ msg.setMaterialCode(value);
1833
+ break;
1834
+ case 2:
1835
+ var value = /** @type {string} */ (reader.readString());
1836
+ msg.setMaterialTypeCodeRef(value);
1837
+ break;
1838
+ case 3:
1839
+ var value = /** @type {string} */ (reader.readString());
1840
+ msg.setMaterialDescription(value);
1841
+ break;
1842
+ case 4:
1843
+ var value = /** @type {string} */ (reader.readString());
1844
+ msg.setMaterialCategory(value);
1845
+ break;
1846
+ case 5:
1847
+ var value = /** @type {number} */ (reader.readInt64());
1848
+ msg.setOldProductNumber(value);
1849
+ break;
1850
+ case 6:
1851
+ var value = /** @type {string} */ (reader.readString());
1852
+ msg.setMaterialGroupRef(value);
1853
+ break;
1854
+ case 7:
1855
+ var value = new proto.MaterialLanguageDescription;
1856
+ reader.readMessage(value,proto.MaterialLanguageDescription.deserializeBinaryFromReader);
1857
+ msg.addLanguageDescription(value);
1858
+ break;
1859
+ case 8:
1860
+ var value = new proto.MaterialUOMRequest;
1861
+ reader.readMessage(value,proto.MaterialUOMRequest.deserializeBinaryFromReader);
1862
+ msg.addUnitOfMeasure(value);
1863
+ break;
1864
+ case 9:
1865
+ var value = /** @type {string} */ (reader.readString());
1866
+ msg.setCreatedBy(value);
1867
+ break;
1868
+ case 10:
1869
+ var value = /** @type {string} */ (reader.readString());
1870
+ msg.setUpdatedBy(value);
1871
+ break;
1872
+ case 11:
1873
+ var value = /** @type {string} */ (reader.readString());
1874
+ msg.setMaterialPlantRef(value);
1875
+ break;
1876
+ case 12:
1877
+ var value = /** @type {string} */ (reader.readString());
1878
+ msg.setBaseUnitOfMeasureRef(value);
1879
+ break;
1880
+ default:
1881
+ reader.skipField();
1882
+ break;
1883
+ }
1884
+ }
1885
+ return msg;
1886
+ };
1887
+
1888
+
1889
+ /**
1890
+ * Serializes the message to binary data (in protobuf wire format).
1891
+ * @return {!Uint8Array}
1892
+ */
1893
+ proto.BaseMaterialRequest.prototype.serializeBinary = function() {
1894
+ var writer = new jspb.BinaryWriter();
1895
+ proto.BaseMaterialRequest.serializeBinaryToWriter(this, writer);
1896
+ return writer.getResultBuffer();
1897
+ };
1898
+
1899
+
1900
+ /**
1901
+ * Serializes the given message to binary data (in protobuf wire
1902
+ * format), writing to the given BinaryWriter.
1903
+ * @param {!proto.BaseMaterialRequest} message
1904
+ * @param {!jspb.BinaryWriter} writer
1905
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1906
+ */
1907
+ proto.BaseMaterialRequest.serializeBinaryToWriter = function(message, writer) {
1908
+ var f = undefined;
1909
+ f = message.getMaterialCode();
1910
+ if (f.length > 0) {
1911
+ writer.writeString(
1912
+ 1,
1913
+ f
1914
+ );
1915
+ }
1916
+ f = message.getMaterialTypeCodeRef();
1917
+ if (f.length > 0) {
1918
+ writer.writeString(
1919
+ 2,
1920
+ f
1921
+ );
1922
+ }
1923
+ f = message.getMaterialDescription();
1924
+ if (f.length > 0) {
1925
+ writer.writeString(
1926
+ 3,
1927
+ f
1928
+ );
1929
+ }
1930
+ f = message.getMaterialCategory();
1931
+ if (f.length > 0) {
1932
+ writer.writeString(
1933
+ 4,
1934
+ f
1935
+ );
1936
+ }
1937
+ f = message.getOldProductNumber();
1938
+ if (f !== 0) {
1939
+ writer.writeInt64(
1940
+ 5,
1941
+ f
1942
+ );
1943
+ }
1944
+ f = message.getMaterialGroupRef();
1945
+ if (f.length > 0) {
1946
+ writer.writeString(
1947
+ 6,
1948
+ f
1949
+ );
1950
+ }
1951
+ f = message.getLanguageDescriptionList();
1952
+ if (f.length > 0) {
1953
+ writer.writeRepeatedMessage(
1954
+ 7,
1955
+ f,
1956
+ proto.MaterialLanguageDescription.serializeBinaryToWriter
1957
+ );
1958
+ }
1959
+ f = message.getUnitOfMeasureList();
1960
+ if (f.length > 0) {
1961
+ writer.writeRepeatedMessage(
1962
+ 8,
1963
+ f,
1964
+ proto.MaterialUOMRequest.serializeBinaryToWriter
1965
+ );
1966
+ }
1967
+ f = message.getCreatedBy();
1968
+ if (f.length > 0) {
1969
+ writer.writeString(
1970
+ 9,
1971
+ f
1972
+ );
1973
+ }
1974
+ f = message.getUpdatedBy();
1975
+ if (f.length > 0) {
1976
+ writer.writeString(
1977
+ 10,
1978
+ f
1979
+ );
1980
+ }
1981
+ f = message.getMaterialPlantRef();
1982
+ if (f.length > 0) {
1983
+ writer.writeString(
1984
+ 11,
1985
+ f
1986
+ );
1987
+ }
1988
+ f = message.getBaseUnitOfMeasureRef();
1989
+ if (f.length > 0) {
1990
+ writer.writeString(
1991
+ 12,
1992
+ f
1993
+ );
1994
+ }
1995
+ };
1996
+
1997
+
1998
+ /**
1999
+ * optional string material_code = 1;
2000
+ * @return {string}
2001
+ */
2002
+ proto.BaseMaterialRequest.prototype.getMaterialCode = function() {
2003
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2004
+ };
2005
+
2006
+
2007
+ /**
2008
+ * @param {string} value
2009
+ * @return {!proto.BaseMaterialRequest} returns this
2010
+ */
2011
+ proto.BaseMaterialRequest.prototype.setMaterialCode = function(value) {
2012
+ return jspb.Message.setProto3StringField(this, 1, value);
2013
+ };
2014
+
2015
+
2016
+ /**
2017
+ * optional string material_type_code_ref = 2;
2018
+ * @return {string}
2019
+ */
2020
+ proto.BaseMaterialRequest.prototype.getMaterialTypeCodeRef = function() {
2021
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2022
+ };
2023
+
2024
+
2025
+ /**
2026
+ * @param {string} value
2027
+ * @return {!proto.BaseMaterialRequest} returns this
2028
+ */
2029
+ proto.BaseMaterialRequest.prototype.setMaterialTypeCodeRef = function(value) {
2030
+ return jspb.Message.setProto3StringField(this, 2, value);
2031
+ };
2032
+
2033
+
2034
+ /**
2035
+ * optional string material_description = 3;
2036
+ * @return {string}
2037
+ */
2038
+ proto.BaseMaterialRequest.prototype.getMaterialDescription = function() {
2039
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2040
+ };
2041
+
2042
+
2043
+ /**
2044
+ * @param {string} value
2045
+ * @return {!proto.BaseMaterialRequest} returns this
2046
+ */
2047
+ proto.BaseMaterialRequest.prototype.setMaterialDescription = function(value) {
2048
+ return jspb.Message.setProto3StringField(this, 3, value);
2049
+ };
2050
+
2051
+
2052
+ /**
2053
+ * optional string material_category = 4;
2054
+ * @return {string}
2055
+ */
2056
+ proto.BaseMaterialRequest.prototype.getMaterialCategory = function() {
2057
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2058
+ };
2059
+
2060
+
2061
+ /**
2062
+ * @param {string} value
2063
+ * @return {!proto.BaseMaterialRequest} returns this
2064
+ */
2065
+ proto.BaseMaterialRequest.prototype.setMaterialCategory = function(value) {
2066
+ return jspb.Message.setProto3StringField(this, 4, value);
2067
+ };
2068
+
2069
+
2070
+ /**
2071
+ * optional int64 old_product_number = 5;
2072
+ * @return {number}
2073
+ */
2074
+ proto.BaseMaterialRequest.prototype.getOldProductNumber = function() {
2075
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2076
+ };
2077
+
2078
+
2079
+ /**
2080
+ * @param {number} value
2081
+ * @return {!proto.BaseMaterialRequest} returns this
2082
+ */
2083
+ proto.BaseMaterialRequest.prototype.setOldProductNumber = function(value) {
2084
+ return jspb.Message.setProto3IntField(this, 5, value);
2085
+ };
2086
+
2087
+
2088
+ /**
2089
+ * optional string material_group_ref = 6;
2090
+ * @return {string}
2091
+ */
2092
+ proto.BaseMaterialRequest.prototype.getMaterialGroupRef = function() {
2093
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
2094
+ };
2095
+
2096
+
2097
+ /**
2098
+ * @param {string} value
2099
+ * @return {!proto.BaseMaterialRequest} returns this
2100
+ */
2101
+ proto.BaseMaterialRequest.prototype.setMaterialGroupRef = function(value) {
2102
+ return jspb.Message.setProto3StringField(this, 6, value);
2103
+ };
2104
+
2105
+
2106
+ /**
2107
+ * repeated MaterialLanguageDescription language_description = 7;
2108
+ * @return {!Array<!proto.MaterialLanguageDescription>}
2109
+ */
2110
+ proto.BaseMaterialRequest.prototype.getLanguageDescriptionList = function() {
2111
+ return /** @type{!Array<!proto.MaterialLanguageDescription>} */ (
2112
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialLanguageDescription, 7));
2113
+ };
2114
+
2115
+
2116
+ /**
2117
+ * @param {!Array<!proto.MaterialLanguageDescription>} value
2118
+ * @return {!proto.BaseMaterialRequest} returns this
2119
+ */
2120
+ proto.BaseMaterialRequest.prototype.setLanguageDescriptionList = function(value) {
2121
+ return jspb.Message.setRepeatedWrapperField(this, 7, value);
2122
+ };
2123
+
2124
+
2125
+ /**
2126
+ * @param {!proto.MaterialLanguageDescription=} opt_value
2127
+ * @param {number=} opt_index
2128
+ * @return {!proto.MaterialLanguageDescription}
2129
+ */
2130
+ proto.BaseMaterialRequest.prototype.addLanguageDescription = function(opt_value, opt_index) {
2131
+ return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.MaterialLanguageDescription, opt_index);
2132
+ };
2133
+
2134
+
2135
+ /**
2136
+ * Clears the list making it empty but non-null.
2137
+ * @return {!proto.BaseMaterialRequest} returns this
2138
+ */
2139
+ proto.BaseMaterialRequest.prototype.clearLanguageDescriptionList = function() {
2140
+ return this.setLanguageDescriptionList([]);
2141
+ };
2142
+
2143
+
2144
+ /**
2145
+ * repeated MaterialUOMRequest unit_of_measure = 8;
2146
+ * @return {!Array<!proto.MaterialUOMRequest>}
2147
+ */
2148
+ proto.BaseMaterialRequest.prototype.getUnitOfMeasureList = function() {
2149
+ return /** @type{!Array<!proto.MaterialUOMRequest>} */ (
2150
+ jspb.Message.getRepeatedWrapperField(this, proto.MaterialUOMRequest, 8));
2151
+ };
2152
+
2153
+
2154
+ /**
2155
+ * @param {!Array<!proto.MaterialUOMRequest>} value
2156
+ * @return {!proto.BaseMaterialRequest} returns this
2157
+ */
2158
+ proto.BaseMaterialRequest.prototype.setUnitOfMeasureList = function(value) {
2159
+ return jspb.Message.setRepeatedWrapperField(this, 8, value);
2160
+ };
2161
+
2162
+
2163
+ /**
2164
+ * @param {!proto.MaterialUOMRequest=} opt_value
2165
+ * @param {number=} opt_index
2166
+ * @return {!proto.MaterialUOMRequest}
2167
+ */
2168
+ proto.BaseMaterialRequest.prototype.addUnitOfMeasure = function(opt_value, opt_index) {
2169
+ return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.MaterialUOMRequest, opt_index);
2170
+ };
2171
+
2172
+
2173
+ /**
2174
+ * Clears the list making it empty but non-null.
2175
+ * @return {!proto.BaseMaterialRequest} returns this
2176
+ */
2177
+ proto.BaseMaterialRequest.prototype.clearUnitOfMeasureList = function() {
2178
+ return this.setUnitOfMeasureList([]);
2179
+ };
2180
+
2181
+
2182
+ /**
2183
+ * optional string created_by = 9;
2184
+ * @return {string}
2185
+ */
2186
+ proto.BaseMaterialRequest.prototype.getCreatedBy = function() {
2187
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
2188
+ };
2189
+
2190
+
2191
+ /**
2192
+ * @param {string} value
2193
+ * @return {!proto.BaseMaterialRequest} returns this
2194
+ */
2195
+ proto.BaseMaterialRequest.prototype.setCreatedBy = function(value) {
2196
+ return jspb.Message.setProto3StringField(this, 9, value);
2197
+ };
2198
+
2199
+
2200
+ /**
2201
+ * optional string updated_by = 10;
2202
+ * @return {string}
2203
+ */
2204
+ proto.BaseMaterialRequest.prototype.getUpdatedBy = function() {
2205
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
2206
+ };
2207
+
2208
+
2209
+ /**
2210
+ * @param {string} value
2211
+ * @return {!proto.BaseMaterialRequest} returns this
2212
+ */
2213
+ proto.BaseMaterialRequest.prototype.setUpdatedBy = function(value) {
2214
+ return jspb.Message.setProto3StringField(this, 10, value);
2215
+ };
2216
+
2217
+
2218
+ /**
2219
+ * optional string material_plant_ref = 11;
2220
+ * @return {string}
2221
+ */
2222
+ proto.BaseMaterialRequest.prototype.getMaterialPlantRef = function() {
2223
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
2224
+ };
2225
+
2226
+
2227
+ /**
2228
+ * @param {string} value
2229
+ * @return {!proto.BaseMaterialRequest} returns this
2230
+ */
2231
+ proto.BaseMaterialRequest.prototype.setMaterialPlantRef = function(value) {
2232
+ return jspb.Message.setProto3StringField(this, 11, value);
2233
+ };
2234
+
2235
+
2236
+ /**
2237
+ * optional string base_unit_of_measure_ref = 12;
2238
+ * @return {string}
2239
+ */
2240
+ proto.BaseMaterialRequest.prototype.getBaseUnitOfMeasureRef = function() {
2241
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
2242
+ };
2243
+
2244
+
2245
+ /**
2246
+ * @param {string} value
2247
+ * @return {!proto.BaseMaterialRequest} returns this
2248
+ */
2249
+ proto.BaseMaterialRequest.prototype.setBaseUnitOfMeasureRef = function(value) {
2250
+ return jspb.Message.setProto3StringField(this, 12, value);
2251
+ };
2252
+
2253
+
2254
+
2255
+
2256
+
2257
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2258
+ /**
2259
+ * Creates an object representation of this proto.
2260
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2261
+ * Optional fields that are not set will be set to undefined.
2262
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2263
+ * For the list of reserved names please see:
2264
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2265
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2266
+ * JSPB instance for transitional soy proto support:
2267
+ * http://goto/soy-param-migration
2268
+ * @return {!Object}
2269
+ */
2270
+ proto.CreateMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2271
+ return proto.CreateMaterialRequest.toObject(opt_includeInstance, this);
2272
+ };
2273
+
2274
+
2275
+ /**
2276
+ * Static version of the {@see toObject} method.
2277
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2278
+ * the JSPB instance for transitional soy proto support:
2279
+ * http://goto/soy-param-migration
2280
+ * @param {!proto.CreateMaterialRequest} msg The msg instance to transform.
2281
+ * @return {!Object}
2282
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2283
+ */
2284
+ proto.CreateMaterialRequest.toObject = function(includeInstance, msg) {
2285
+ var f, obj = {
2286
+ baseMaterial: (f = msg.getBaseMaterial()) && proto.BaseMaterialRequest.toObject(includeInstance, f)
2287
+ };
2288
+
2289
+ if (includeInstance) {
2290
+ obj.$jspbMessageInstance = msg;
2291
+ }
2292
+ return obj;
2293
+ };
2294
+ }
2295
+
2296
+
2297
+ /**
2298
+ * Deserializes binary data (in protobuf wire format).
2299
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2300
+ * @return {!proto.CreateMaterialRequest}
2301
+ */
2302
+ proto.CreateMaterialRequest.deserializeBinary = function(bytes) {
2303
+ var reader = new jspb.BinaryReader(bytes);
2304
+ var msg = new proto.CreateMaterialRequest;
2305
+ return proto.CreateMaterialRequest.deserializeBinaryFromReader(msg, reader);
2306
+ };
2307
+
2308
+
2309
+ /**
2310
+ * Deserializes binary data (in protobuf wire format) from the
2311
+ * given reader into the given message object.
2312
+ * @param {!proto.CreateMaterialRequest} msg The message object to deserialize into.
2313
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2314
+ * @return {!proto.CreateMaterialRequest}
2315
+ */
2316
+ proto.CreateMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2317
+ while (reader.nextField()) {
2318
+ if (reader.isEndGroup()) {
2319
+ break;
2320
+ }
2321
+ var field = reader.getFieldNumber();
2322
+ switch (field) {
2323
+ case 1:
2324
+ var value = new proto.BaseMaterialRequest;
2325
+ reader.readMessage(value,proto.BaseMaterialRequest.deserializeBinaryFromReader);
2326
+ msg.setBaseMaterial(value);
2327
+ break;
2328
+ default:
2329
+ reader.skipField();
2330
+ break;
2331
+ }
2332
+ }
2333
+ return msg;
2334
+ };
2335
+
2336
+
2337
+ /**
2338
+ * Serializes the message to binary data (in protobuf wire format).
2339
+ * @return {!Uint8Array}
2340
+ */
2341
+ proto.CreateMaterialRequest.prototype.serializeBinary = function() {
2342
+ var writer = new jspb.BinaryWriter();
2343
+ proto.CreateMaterialRequest.serializeBinaryToWriter(this, writer);
2344
+ return writer.getResultBuffer();
2345
+ };
2346
+
2347
+
2348
+ /**
2349
+ * Serializes the given message to binary data (in protobuf wire
2350
+ * format), writing to the given BinaryWriter.
2351
+ * @param {!proto.CreateMaterialRequest} message
2352
+ * @param {!jspb.BinaryWriter} writer
2353
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2354
+ */
2355
+ proto.CreateMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2356
+ var f = undefined;
2357
+ f = message.getBaseMaterial();
2358
+ if (f != null) {
2359
+ writer.writeMessage(
2360
+ 1,
2361
+ f,
2362
+ proto.BaseMaterialRequest.serializeBinaryToWriter
2363
+ );
2364
+ }
2365
+ };
2366
+
2367
+
2368
+ /**
2369
+ * optional BaseMaterialRequest base_material = 1;
2370
+ * @return {?proto.BaseMaterialRequest}
2371
+ */
2372
+ proto.CreateMaterialRequest.prototype.getBaseMaterial = function() {
2373
+ return /** @type{?proto.BaseMaterialRequest} */ (
2374
+ jspb.Message.getWrapperField(this, proto.BaseMaterialRequest, 1));
2375
+ };
2376
+
2377
+
2378
+ /**
2379
+ * @param {?proto.BaseMaterialRequest|undefined} value
2380
+ * @return {!proto.CreateMaterialRequest} returns this
2381
+ */
2382
+ proto.CreateMaterialRequest.prototype.setBaseMaterial = function(value) {
2383
+ return jspb.Message.setWrapperField(this, 1, value);
2384
+ };
2385
+
2386
+
2387
+ /**
2388
+ * Clears the message field making it undefined.
2389
+ * @return {!proto.CreateMaterialRequest} returns this
2390
+ */
2391
+ proto.CreateMaterialRequest.prototype.clearBaseMaterial = function() {
2392
+ return this.setBaseMaterial(undefined);
2393
+ };
2394
+
2395
+
2396
+ /**
2397
+ * Returns whether this field is set.
2398
+ * @return {boolean}
2399
+ */
2400
+ proto.CreateMaterialRequest.prototype.hasBaseMaterial = function() {
2401
+ return jspb.Message.getField(this, 1) != null;
2402
+ };
2403
+
2404
+
2405
+
2406
+
2407
+
2408
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2409
+ /**
2410
+ * Creates an object representation of this proto.
2411
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2412
+ * Optional fields that are not set will be set to undefined.
2413
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2414
+ * For the list of reserved names please see:
2415
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2416
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2417
+ * JSPB instance for transitional soy proto support:
2418
+ * http://goto/soy-param-migration
2419
+ * @return {!Object}
2420
+ */
2421
+ proto.UpdateMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2422
+ return proto.UpdateMaterialRequest.toObject(opt_includeInstance, this);
2423
+ };
2424
+
2425
+
2426
+ /**
2427
+ * Static version of the {@see toObject} method.
2428
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2429
+ * the JSPB instance for transitional soy proto support:
2430
+ * http://goto/soy-param-migration
2431
+ * @param {!proto.UpdateMaterialRequest} msg The msg instance to transform.
2432
+ * @return {!Object}
2433
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2434
+ */
2435
+ proto.UpdateMaterialRequest.toObject = function(includeInstance, msg) {
2436
+ var f, obj = {
2437
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2438
+ baseMaterial: (f = msg.getBaseMaterial()) && proto.BaseMaterialRequest.toObject(includeInstance, f)
2439
+ };
2440
+
2441
+ if (includeInstance) {
2442
+ obj.$jspbMessageInstance = msg;
2443
+ }
2444
+ return obj;
2445
+ };
2446
+ }
2447
+
2448
+
2449
+ /**
2450
+ * Deserializes binary data (in protobuf wire format).
2451
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2452
+ * @return {!proto.UpdateMaterialRequest}
2453
+ */
2454
+ proto.UpdateMaterialRequest.deserializeBinary = function(bytes) {
2455
+ var reader = new jspb.BinaryReader(bytes);
2456
+ var msg = new proto.UpdateMaterialRequest;
2457
+ return proto.UpdateMaterialRequest.deserializeBinaryFromReader(msg, reader);
2458
+ };
2459
+
2460
+
2461
+ /**
2462
+ * Deserializes binary data (in protobuf wire format) from the
2463
+ * given reader into the given message object.
2464
+ * @param {!proto.UpdateMaterialRequest} msg The message object to deserialize into.
2465
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2466
+ * @return {!proto.UpdateMaterialRequest}
2467
+ */
2468
+ proto.UpdateMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2469
+ while (reader.nextField()) {
2470
+ if (reader.isEndGroup()) {
2471
+ break;
2472
+ }
2473
+ var field = reader.getFieldNumber();
2474
+ switch (field) {
2475
+ case 1:
2476
+ var value = /** @type {string} */ (reader.readString());
2477
+ msg.setReferencesId(value);
2478
+ break;
2479
+ case 2:
2480
+ var value = new proto.BaseMaterialRequest;
2481
+ reader.readMessage(value,proto.BaseMaterialRequest.deserializeBinaryFromReader);
2482
+ msg.setBaseMaterial(value);
2483
+ break;
2484
+ default:
2485
+ reader.skipField();
2486
+ break;
2487
+ }
2488
+ }
2489
+ return msg;
2490
+ };
2491
+
2492
+
2493
+ /**
2494
+ * Serializes the message to binary data (in protobuf wire format).
2495
+ * @return {!Uint8Array}
2496
+ */
2497
+ proto.UpdateMaterialRequest.prototype.serializeBinary = function() {
2498
+ var writer = new jspb.BinaryWriter();
2499
+ proto.UpdateMaterialRequest.serializeBinaryToWriter(this, writer);
2500
+ return writer.getResultBuffer();
2501
+ };
2502
+
2503
+
2504
+ /**
2505
+ * Serializes the given message to binary data (in protobuf wire
2506
+ * format), writing to the given BinaryWriter.
2507
+ * @param {!proto.UpdateMaterialRequest} message
2508
+ * @param {!jspb.BinaryWriter} writer
2509
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2510
+ */
2511
+ proto.UpdateMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2512
+ var f = undefined;
2513
+ f = message.getReferencesId();
2514
+ if (f.length > 0) {
2515
+ writer.writeString(
2516
+ 1,
2517
+ f
2518
+ );
2519
+ }
2520
+ f = message.getBaseMaterial();
2521
+ if (f != null) {
2522
+ writer.writeMessage(
2523
+ 2,
2524
+ f,
2525
+ proto.BaseMaterialRequest.serializeBinaryToWriter
2526
+ );
2527
+ }
2528
+ };
2529
+
2530
+
2531
+ /**
2532
+ * optional string references_id = 1;
2533
+ * @return {string}
2534
+ */
2535
+ proto.UpdateMaterialRequest.prototype.getReferencesId = function() {
2536
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2537
+ };
2538
+
2539
+
2540
+ /**
2541
+ * @param {string} value
2542
+ * @return {!proto.UpdateMaterialRequest} returns this
2543
+ */
2544
+ proto.UpdateMaterialRequest.prototype.setReferencesId = function(value) {
2545
+ return jspb.Message.setProto3StringField(this, 1, value);
2546
+ };
2547
+
2548
+
2549
+ /**
2550
+ * optional BaseMaterialRequest base_material = 2;
2551
+ * @return {?proto.BaseMaterialRequest}
2552
+ */
2553
+ proto.UpdateMaterialRequest.prototype.getBaseMaterial = function() {
2554
+ return /** @type{?proto.BaseMaterialRequest} */ (
2555
+ jspb.Message.getWrapperField(this, proto.BaseMaterialRequest, 2));
2556
+ };
2557
+
2558
+
2559
+ /**
2560
+ * @param {?proto.BaseMaterialRequest|undefined} value
2561
+ * @return {!proto.UpdateMaterialRequest} returns this
2562
+ */
2563
+ proto.UpdateMaterialRequest.prototype.setBaseMaterial = function(value) {
2564
+ return jspb.Message.setWrapperField(this, 2, value);
2565
+ };
2566
+
2567
+
2568
+ /**
2569
+ * Clears the message field making it undefined.
2570
+ * @return {!proto.UpdateMaterialRequest} returns this
2571
+ */
2572
+ proto.UpdateMaterialRequest.prototype.clearBaseMaterial = function() {
2573
+ return this.setBaseMaterial(undefined);
2574
+ };
2575
+
2576
+
2577
+ /**
2578
+ * Returns whether this field is set.
2579
+ * @return {boolean}
2580
+ */
2581
+ proto.UpdateMaterialRequest.prototype.hasBaseMaterial = function() {
2582
+ return jspb.Message.getField(this, 2) != null;
2583
+ };
2584
+
2585
+
2586
+
2587
+
2588
+
2589
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2590
+ /**
2591
+ * Creates an object representation of this proto.
2592
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2593
+ * Optional fields that are not set will be set to undefined.
2594
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2595
+ * For the list of reserved names please see:
2596
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2597
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2598
+ * JSPB instance for transitional soy proto support:
2599
+ * http://goto/soy-param-migration
2600
+ * @return {!Object}
2601
+ */
2602
+ proto.DeleteMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2603
+ return proto.DeleteMaterialRequest.toObject(opt_includeInstance, this);
2604
+ };
2605
+
2606
+
2607
+ /**
2608
+ * Static version of the {@see toObject} method.
2609
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2610
+ * the JSPB instance for transitional soy proto support:
2611
+ * http://goto/soy-param-migration
2612
+ * @param {!proto.DeleteMaterialRequest} msg The msg instance to transform.
2613
+ * @return {!Object}
2614
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2615
+ */
2616
+ proto.DeleteMaterialRequest.toObject = function(includeInstance, msg) {
2617
+ var f, obj = {
2618
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, "")
2619
+ };
2620
+
2621
+ if (includeInstance) {
2622
+ obj.$jspbMessageInstance = msg;
2623
+ }
2624
+ return obj;
2625
+ };
2626
+ }
2627
+
2628
+
2629
+ /**
2630
+ * Deserializes binary data (in protobuf wire format).
2631
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2632
+ * @return {!proto.DeleteMaterialRequest}
2633
+ */
2634
+ proto.DeleteMaterialRequest.deserializeBinary = function(bytes) {
2635
+ var reader = new jspb.BinaryReader(bytes);
2636
+ var msg = new proto.DeleteMaterialRequest;
2637
+ return proto.DeleteMaterialRequest.deserializeBinaryFromReader(msg, reader);
2638
+ };
2639
+
2640
+
2641
+ /**
2642
+ * Deserializes binary data (in protobuf wire format) from the
2643
+ * given reader into the given message object.
2644
+ * @param {!proto.DeleteMaterialRequest} msg The message object to deserialize into.
2645
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2646
+ * @return {!proto.DeleteMaterialRequest}
2647
+ */
2648
+ proto.DeleteMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2649
+ while (reader.nextField()) {
2650
+ if (reader.isEndGroup()) {
2651
+ break;
2652
+ }
2653
+ var field = reader.getFieldNumber();
2654
+ switch (field) {
2655
+ case 1:
2656
+ var value = /** @type {string} */ (reader.readString());
2657
+ msg.setReferencesId(value);
2658
+ break;
2659
+ default:
2660
+ reader.skipField();
2661
+ break;
2662
+ }
2663
+ }
2664
+ return msg;
2665
+ };
2666
+
2667
+
2668
+ /**
2669
+ * Serializes the message to binary data (in protobuf wire format).
2670
+ * @return {!Uint8Array}
2671
+ */
2672
+ proto.DeleteMaterialRequest.prototype.serializeBinary = function() {
2673
+ var writer = new jspb.BinaryWriter();
2674
+ proto.DeleteMaterialRequest.serializeBinaryToWriter(this, writer);
2675
+ return writer.getResultBuffer();
2676
+ };
2677
+
2678
+
2679
+ /**
2680
+ * Serializes the given message to binary data (in protobuf wire
2681
+ * format), writing to the given BinaryWriter.
2682
+ * @param {!proto.DeleteMaterialRequest} message
2683
+ * @param {!jspb.BinaryWriter} writer
2684
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2685
+ */
2686
+ proto.DeleteMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2687
+ var f = undefined;
2688
+ f = message.getReferencesId();
2689
+ if (f.length > 0) {
2690
+ writer.writeString(
2691
+ 1,
2692
+ f
2693
+ );
2694
+ }
2695
+ };
2696
+
2697
+
2698
+ /**
2699
+ * optional string references_id = 1;
2700
+ * @return {string}
2701
+ */
2702
+ proto.DeleteMaterialRequest.prototype.getReferencesId = function() {
2703
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2704
+ };
2705
+
2706
+
2707
+ /**
2708
+ * @param {string} value
2709
+ * @return {!proto.DeleteMaterialRequest} returns this
2710
+ */
2711
+ proto.DeleteMaterialRequest.prototype.setReferencesId = function(value) {
2712
+ return jspb.Message.setProto3StringField(this, 1, value);
2713
+ };
2714
+
2715
+
2716
+
2717
+
2718
+
2719
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2720
+ /**
2721
+ * Creates an object representation of this proto.
2722
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2723
+ * Optional fields that are not set will be set to undefined.
2724
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2725
+ * For the list of reserved names please see:
2726
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2727
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2728
+ * JSPB instance for transitional soy proto support:
2729
+ * http://goto/soy-param-migration
2730
+ * @return {!Object}
2731
+ */
2732
+ proto.GetMaterialByIdRequest.prototype.toObject = function(opt_includeInstance) {
2733
+ return proto.GetMaterialByIdRequest.toObject(opt_includeInstance, this);
2734
+ };
2735
+
2736
+
2737
+ /**
2738
+ * Static version of the {@see toObject} method.
2739
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2740
+ * the JSPB instance for transitional soy proto support:
2741
+ * http://goto/soy-param-migration
2742
+ * @param {!proto.GetMaterialByIdRequest} msg The msg instance to transform.
2743
+ * @return {!Object}
2744
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2745
+ */
2746
+ proto.GetMaterialByIdRequest.toObject = function(includeInstance, msg) {
2747
+ var f, obj = {
2748
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, "")
2749
+ };
2750
+
2751
+ if (includeInstance) {
2752
+ obj.$jspbMessageInstance = msg;
2753
+ }
2754
+ return obj;
2755
+ };
2756
+ }
2757
+
2758
+
2759
+ /**
2760
+ * Deserializes binary data (in protobuf wire format).
2761
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2762
+ * @return {!proto.GetMaterialByIdRequest}
2763
+ */
2764
+ proto.GetMaterialByIdRequest.deserializeBinary = function(bytes) {
2765
+ var reader = new jspb.BinaryReader(bytes);
2766
+ var msg = new proto.GetMaterialByIdRequest;
2767
+ return proto.GetMaterialByIdRequest.deserializeBinaryFromReader(msg, reader);
2768
+ };
2769
+
2770
+
2771
+ /**
2772
+ * Deserializes binary data (in protobuf wire format) from the
2773
+ * given reader into the given message object.
2774
+ * @param {!proto.GetMaterialByIdRequest} msg The message object to deserialize into.
2775
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2776
+ * @return {!proto.GetMaterialByIdRequest}
2777
+ */
2778
+ proto.GetMaterialByIdRequest.deserializeBinaryFromReader = function(msg, reader) {
2779
+ while (reader.nextField()) {
2780
+ if (reader.isEndGroup()) {
2781
+ break;
2782
+ }
2783
+ var field = reader.getFieldNumber();
2784
+ switch (field) {
2785
+ case 1:
2786
+ var value = /** @type {string} */ (reader.readString());
2787
+ msg.setReferencesId(value);
2788
+ break;
2789
+ default:
2790
+ reader.skipField();
2791
+ break;
2792
+ }
2793
+ }
2794
+ return msg;
2795
+ };
2796
+
2797
+
2798
+ /**
2799
+ * Serializes the message to binary data (in protobuf wire format).
2800
+ * @return {!Uint8Array}
2801
+ */
2802
+ proto.GetMaterialByIdRequest.prototype.serializeBinary = function() {
2803
+ var writer = new jspb.BinaryWriter();
2804
+ proto.GetMaterialByIdRequest.serializeBinaryToWriter(this, writer);
2805
+ return writer.getResultBuffer();
2806
+ };
2807
+
2808
+
2809
+ /**
2810
+ * Serializes the given message to binary data (in protobuf wire
2811
+ * format), writing to the given BinaryWriter.
2812
+ * @param {!proto.GetMaterialByIdRequest} message
2813
+ * @param {!jspb.BinaryWriter} writer
2814
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2815
+ */
2816
+ proto.GetMaterialByIdRequest.serializeBinaryToWriter = function(message, writer) {
2817
+ var f = undefined;
2818
+ f = message.getReferencesId();
2819
+ if (f.length > 0) {
2820
+ writer.writeString(
2821
+ 1,
2822
+ f
2823
+ );
2824
+ }
2825
+ };
2826
+
2827
+
2828
+ /**
2829
+ * optional string references_id = 1;
2830
+ * @return {string}
2831
+ */
2832
+ proto.GetMaterialByIdRequest.prototype.getReferencesId = function() {
2833
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2834
+ };
2835
+
2836
+
2837
+ /**
2838
+ * @param {string} value
2839
+ * @return {!proto.GetMaterialByIdRequest} returns this
2840
+ */
2841
+ proto.GetMaterialByIdRequest.prototype.setReferencesId = function(value) {
2842
+ return jspb.Message.setProto3StringField(this, 1, value);
2843
+ };
2844
+
2845
+
2846
+
2847
+
2848
+
2849
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2850
+ /**
2851
+ * Creates an object representation of this proto.
2852
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2853
+ * Optional fields that are not set will be set to undefined.
2854
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2855
+ * For the list of reserved names please see:
2856
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2857
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2858
+ * JSPB instance for transitional soy proto support:
2859
+ * http://goto/soy-param-migration
2860
+ * @return {!Object}
2861
+ */
2862
+ proto.GetListMaterialRequest.prototype.toObject = function(opt_includeInstance) {
2863
+ return proto.GetListMaterialRequest.toObject(opt_includeInstance, this);
2864
+ };
2865
+
2866
+
2867
+ /**
2868
+ * Static version of the {@see toObject} method.
2869
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2870
+ * the JSPB instance for transitional soy proto support:
2871
+ * http://goto/soy-param-migration
2872
+ * @param {!proto.GetListMaterialRequest} msg The msg instance to transform.
2873
+ * @return {!Object}
2874
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2875
+ */
2876
+ proto.GetListMaterialRequest.toObject = function(includeInstance, msg) {
2877
+ var f, obj = {
2878
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
2879
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
2880
+ };
2881
+
2882
+ if (includeInstance) {
2883
+ obj.$jspbMessageInstance = msg;
2884
+ }
2885
+ return obj;
2886
+ };
2887
+ }
2888
+
2889
+
2890
+ /**
2891
+ * Deserializes binary data (in protobuf wire format).
2892
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2893
+ * @return {!proto.GetListMaterialRequest}
2894
+ */
2895
+ proto.GetListMaterialRequest.deserializeBinary = function(bytes) {
2896
+ var reader = new jspb.BinaryReader(bytes);
2897
+ var msg = new proto.GetListMaterialRequest;
2898
+ return proto.GetListMaterialRequest.deserializeBinaryFromReader(msg, reader);
2899
+ };
2900
+
2901
+
2902
+ /**
2903
+ * Deserializes binary data (in protobuf wire format) from the
2904
+ * given reader into the given message object.
2905
+ * @param {!proto.GetListMaterialRequest} msg The message object to deserialize into.
2906
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2907
+ * @return {!proto.GetListMaterialRequest}
2908
+ */
2909
+ proto.GetListMaterialRequest.deserializeBinaryFromReader = function(msg, reader) {
2910
+ while (reader.nextField()) {
2911
+ if (reader.isEndGroup()) {
2912
+ break;
2913
+ }
2914
+ var field = reader.getFieldNumber();
2915
+ switch (field) {
2916
+ case 1:
2917
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
2918
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
2919
+ msg.setPagination(value);
2920
+ break;
2921
+ case 2:
2922
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
2923
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
2924
+ msg.setQuery(value);
2925
+ break;
2926
+ default:
2927
+ reader.skipField();
2928
+ break;
2929
+ }
2930
+ }
2931
+ return msg;
2932
+ };
2933
+
2934
+
2935
+ /**
2936
+ * Serializes the message to binary data (in protobuf wire format).
2937
+ * @return {!Uint8Array}
2938
+ */
2939
+ proto.GetListMaterialRequest.prototype.serializeBinary = function() {
2940
+ var writer = new jspb.BinaryWriter();
2941
+ proto.GetListMaterialRequest.serializeBinaryToWriter(this, writer);
2942
+ return writer.getResultBuffer();
2943
+ };
2944
+
2945
+
2946
+ /**
2947
+ * Serializes the given message to binary data (in protobuf wire
2948
+ * format), writing to the given BinaryWriter.
2949
+ * @param {!proto.GetListMaterialRequest} message
2950
+ * @param {!jspb.BinaryWriter} writer
2951
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2952
+ */
2953
+ proto.GetListMaterialRequest.serializeBinaryToWriter = function(message, writer) {
2954
+ var f = undefined;
2955
+ f = message.getPagination();
2956
+ if (f != null) {
2957
+ writer.writeMessage(
2958
+ 1,
2959
+ f,
2960
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
2961
+ );
2962
+ }
2963
+ f = message.getQuery();
2964
+ if (f != null) {
2965
+ writer.writeMessage(
2966
+ 2,
2967
+ f,
2968
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
2969
+ );
2970
+ }
2971
+ };
2972
+
2973
+
2974
+ /**
2975
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
2976
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
2977
+ */
2978
+ proto.GetListMaterialRequest.prototype.getPagination = function() {
2979
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
2980
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
2981
+ };
2982
+
2983
+
2984
+ /**
2985
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
2986
+ * @return {!proto.GetListMaterialRequest} returns this
2987
+ */
2988
+ proto.GetListMaterialRequest.prototype.setPagination = function(value) {
2989
+ return jspb.Message.setWrapperField(this, 1, value);
2990
+ };
2991
+
2992
+
2993
+ /**
2994
+ * Clears the message field making it undefined.
2995
+ * @return {!proto.GetListMaterialRequest} returns this
2996
+ */
2997
+ proto.GetListMaterialRequest.prototype.clearPagination = function() {
2998
+ return this.setPagination(undefined);
2999
+ };
3000
+
3001
+
3002
+ /**
3003
+ * Returns whether this field is set.
3004
+ * @return {boolean}
3005
+ */
3006
+ proto.GetListMaterialRequest.prototype.hasPagination = function() {
3007
+ return jspb.Message.getField(this, 1) != null;
3008
+ };
3009
+
3010
+
3011
+ /**
3012
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
3013
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
3014
+ */
3015
+ proto.GetListMaterialRequest.prototype.getQuery = function() {
3016
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
3017
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
3018
+ };
3019
+
3020
+
3021
+ /**
3022
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
3023
+ * @return {!proto.GetListMaterialRequest} returns this
3024
+ */
3025
+ proto.GetListMaterialRequest.prototype.setQuery = function(value) {
3026
+ return jspb.Message.setWrapperField(this, 2, value);
3027
+ };
3028
+
3029
+
3030
+ /**
3031
+ * Clears the message field making it undefined.
3032
+ * @return {!proto.GetListMaterialRequest} returns this
3033
+ */
3034
+ proto.GetListMaterialRequest.prototype.clearQuery = function() {
3035
+ return this.setQuery(undefined);
3036
+ };
3037
+
3038
+
3039
+ /**
3040
+ * Returns whether this field is set.
3041
+ * @return {boolean}
3042
+ */
3043
+ proto.GetListMaterialRequest.prototype.hasQuery = function() {
3044
+ return jspb.Message.getField(this, 2) != null;
3045
+ };
3046
+
3047
+
3048
+
3049
+
3050
+
3051
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3052
+ /**
3053
+ * Creates an object representation of this proto.
3054
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3055
+ * Optional fields that are not set will be set to undefined.
3056
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3057
+ * For the list of reserved names please see:
3058
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3059
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3060
+ * JSPB instance for transitional soy proto support:
3061
+ * http://goto/soy-param-migration
3062
+ * @return {!Object}
3063
+ */
3064
+ proto.CreateMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3065
+ return proto.CreateMaterialResponse.toObject(opt_includeInstance, this);
3066
+ };
3067
+
3068
+
3069
+ /**
3070
+ * Static version of the {@see toObject} method.
3071
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3072
+ * the JSPB instance for transitional soy proto support:
3073
+ * http://goto/soy-param-migration
3074
+ * @param {!proto.CreateMaterialResponse} msg The msg instance to transform.
3075
+ * @return {!Object}
3076
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3077
+ */
3078
+ proto.CreateMaterialResponse.toObject = function(includeInstance, msg) {
3079
+ var f, obj = {
3080
+ material: (f = msg.getMaterial()) && proto.Material.toObject(includeInstance, f),
3081
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3082
+ };
3083
+
3084
+ if (includeInstance) {
3085
+ obj.$jspbMessageInstance = msg;
3086
+ }
3087
+ return obj;
3088
+ };
3089
+ }
3090
+
3091
+
3092
+ /**
3093
+ * Deserializes binary data (in protobuf wire format).
3094
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3095
+ * @return {!proto.CreateMaterialResponse}
3096
+ */
3097
+ proto.CreateMaterialResponse.deserializeBinary = function(bytes) {
3098
+ var reader = new jspb.BinaryReader(bytes);
3099
+ var msg = new proto.CreateMaterialResponse;
3100
+ return proto.CreateMaterialResponse.deserializeBinaryFromReader(msg, reader);
3101
+ };
3102
+
3103
+
3104
+ /**
3105
+ * Deserializes binary data (in protobuf wire format) from the
3106
+ * given reader into the given message object.
3107
+ * @param {!proto.CreateMaterialResponse} msg The message object to deserialize into.
3108
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3109
+ * @return {!proto.CreateMaterialResponse}
3110
+ */
3111
+ proto.CreateMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3112
+ while (reader.nextField()) {
3113
+ if (reader.isEndGroup()) {
3114
+ break;
3115
+ }
3116
+ var field = reader.getFieldNumber();
3117
+ switch (field) {
3118
+ case 1:
3119
+ var value = new proto.Material;
3120
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3121
+ msg.setMaterial(value);
3122
+ break;
3123
+ case 2:
3124
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3125
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3126
+ msg.setMeta(value);
3127
+ break;
3128
+ default:
3129
+ reader.skipField();
3130
+ break;
3131
+ }
3132
+ }
3133
+ return msg;
3134
+ };
3135
+
3136
+
3137
+ /**
3138
+ * Serializes the message to binary data (in protobuf wire format).
3139
+ * @return {!Uint8Array}
3140
+ */
3141
+ proto.CreateMaterialResponse.prototype.serializeBinary = function() {
3142
+ var writer = new jspb.BinaryWriter();
3143
+ proto.CreateMaterialResponse.serializeBinaryToWriter(this, writer);
3144
+ return writer.getResultBuffer();
3145
+ };
3146
+
3147
+
3148
+ /**
3149
+ * Serializes the given message to binary data (in protobuf wire
3150
+ * format), writing to the given BinaryWriter.
3151
+ * @param {!proto.CreateMaterialResponse} message
3152
+ * @param {!jspb.BinaryWriter} writer
3153
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3154
+ */
3155
+ proto.CreateMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3156
+ var f = undefined;
3157
+ f = message.getMaterial();
3158
+ if (f != null) {
3159
+ writer.writeMessage(
3160
+ 1,
3161
+ f,
3162
+ proto.Material.serializeBinaryToWriter
3163
+ );
3164
+ }
3165
+ f = message.getMeta();
3166
+ if (f != null) {
3167
+ writer.writeMessage(
3168
+ 2,
3169
+ f,
3170
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3171
+ );
3172
+ }
3173
+ };
3174
+
3175
+
3176
+ /**
3177
+ * optional Material material = 1;
3178
+ * @return {?proto.Material}
3179
+ */
3180
+ proto.CreateMaterialResponse.prototype.getMaterial = function() {
3181
+ return /** @type{?proto.Material} */ (
3182
+ jspb.Message.getWrapperField(this, proto.Material, 1));
3183
+ };
3184
+
3185
+
3186
+ /**
3187
+ * @param {?proto.Material|undefined} value
3188
+ * @return {!proto.CreateMaterialResponse} returns this
3189
+ */
3190
+ proto.CreateMaterialResponse.prototype.setMaterial = function(value) {
3191
+ return jspb.Message.setWrapperField(this, 1, value);
3192
+ };
3193
+
3194
+
3195
+ /**
3196
+ * Clears the message field making it undefined.
3197
+ * @return {!proto.CreateMaterialResponse} returns this
3198
+ */
3199
+ proto.CreateMaterialResponse.prototype.clearMaterial = function() {
3200
+ return this.setMaterial(undefined);
3201
+ };
3202
+
3203
+
3204
+ /**
3205
+ * Returns whether this field is set.
3206
+ * @return {boolean}
3207
+ */
3208
+ proto.CreateMaterialResponse.prototype.hasMaterial = function() {
3209
+ return jspb.Message.getField(this, 1) != null;
3210
+ };
3211
+
3212
+
3213
+ /**
3214
+ * optional prisca.v1.global.meta.Meta meta = 2;
3215
+ * @return {?proto.prisca.v1.global.meta.Meta}
3216
+ */
3217
+ proto.CreateMaterialResponse.prototype.getMeta = function() {
3218
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3219
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3220
+ };
3221
+
3222
+
3223
+ /**
3224
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3225
+ * @return {!proto.CreateMaterialResponse} returns this
3226
+ */
3227
+ proto.CreateMaterialResponse.prototype.setMeta = function(value) {
3228
+ return jspb.Message.setWrapperField(this, 2, value);
3229
+ };
3230
+
3231
+
3232
+ /**
3233
+ * Clears the message field making it undefined.
3234
+ * @return {!proto.CreateMaterialResponse} returns this
3235
+ */
3236
+ proto.CreateMaterialResponse.prototype.clearMeta = function() {
3237
+ return this.setMeta(undefined);
3238
+ };
3239
+
3240
+
3241
+ /**
3242
+ * Returns whether this field is set.
3243
+ * @return {boolean}
3244
+ */
3245
+ proto.CreateMaterialResponse.prototype.hasMeta = function() {
3246
+ return jspb.Message.getField(this, 2) != null;
3247
+ };
3248
+
3249
+
3250
+
3251
+
3252
+
3253
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3254
+ /**
3255
+ * Creates an object representation of this proto.
3256
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3257
+ * Optional fields that are not set will be set to undefined.
3258
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3259
+ * For the list of reserved names please see:
3260
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3261
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3262
+ * JSPB instance for transitional soy proto support:
3263
+ * http://goto/soy-param-migration
3264
+ * @return {!Object}
3265
+ */
3266
+ proto.UpdateMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3267
+ return proto.UpdateMaterialResponse.toObject(opt_includeInstance, this);
3268
+ };
3269
+
3270
+
3271
+ /**
3272
+ * Static version of the {@see toObject} method.
3273
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3274
+ * the JSPB instance for transitional soy proto support:
3275
+ * http://goto/soy-param-migration
3276
+ * @param {!proto.UpdateMaterialResponse} msg The msg instance to transform.
3277
+ * @return {!Object}
3278
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3279
+ */
3280
+ proto.UpdateMaterialResponse.toObject = function(includeInstance, msg) {
3281
+ var f, obj = {
3282
+ material: (f = msg.getMaterial()) && proto.Material.toObject(includeInstance, f),
3283
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3284
+ };
3285
+
3286
+ if (includeInstance) {
3287
+ obj.$jspbMessageInstance = msg;
3288
+ }
3289
+ return obj;
3290
+ };
3291
+ }
3292
+
3293
+
3294
+ /**
3295
+ * Deserializes binary data (in protobuf wire format).
3296
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3297
+ * @return {!proto.UpdateMaterialResponse}
3298
+ */
3299
+ proto.UpdateMaterialResponse.deserializeBinary = function(bytes) {
3300
+ var reader = new jspb.BinaryReader(bytes);
3301
+ var msg = new proto.UpdateMaterialResponse;
3302
+ return proto.UpdateMaterialResponse.deserializeBinaryFromReader(msg, reader);
3303
+ };
3304
+
3305
+
3306
+ /**
3307
+ * Deserializes binary data (in protobuf wire format) from the
3308
+ * given reader into the given message object.
3309
+ * @param {!proto.UpdateMaterialResponse} msg The message object to deserialize into.
3310
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3311
+ * @return {!proto.UpdateMaterialResponse}
3312
+ */
3313
+ proto.UpdateMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3314
+ while (reader.nextField()) {
3315
+ if (reader.isEndGroup()) {
3316
+ break;
3317
+ }
3318
+ var field = reader.getFieldNumber();
3319
+ switch (field) {
3320
+ case 1:
3321
+ var value = new proto.Material;
3322
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3323
+ msg.setMaterial(value);
3324
+ break;
3325
+ case 2:
3326
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3327
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3328
+ msg.setMeta(value);
3329
+ break;
3330
+ default:
3331
+ reader.skipField();
3332
+ break;
3333
+ }
3334
+ }
3335
+ return msg;
3336
+ };
3337
+
3338
+
3339
+ /**
3340
+ * Serializes the message to binary data (in protobuf wire format).
3341
+ * @return {!Uint8Array}
3342
+ */
3343
+ proto.UpdateMaterialResponse.prototype.serializeBinary = function() {
3344
+ var writer = new jspb.BinaryWriter();
3345
+ proto.UpdateMaterialResponse.serializeBinaryToWriter(this, writer);
3346
+ return writer.getResultBuffer();
3347
+ };
3348
+
3349
+
3350
+ /**
3351
+ * Serializes the given message to binary data (in protobuf wire
3352
+ * format), writing to the given BinaryWriter.
3353
+ * @param {!proto.UpdateMaterialResponse} message
3354
+ * @param {!jspb.BinaryWriter} writer
3355
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3356
+ */
3357
+ proto.UpdateMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3358
+ var f = undefined;
3359
+ f = message.getMaterial();
3360
+ if (f != null) {
3361
+ writer.writeMessage(
3362
+ 1,
3363
+ f,
3364
+ proto.Material.serializeBinaryToWriter
3365
+ );
3366
+ }
3367
+ f = message.getMeta();
3368
+ if (f != null) {
3369
+ writer.writeMessage(
3370
+ 2,
3371
+ f,
3372
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3373
+ );
3374
+ }
3375
+ };
3376
+
3377
+
3378
+ /**
3379
+ * optional Material material = 1;
3380
+ * @return {?proto.Material}
3381
+ */
3382
+ proto.UpdateMaterialResponse.prototype.getMaterial = function() {
3383
+ return /** @type{?proto.Material} */ (
3384
+ jspb.Message.getWrapperField(this, proto.Material, 1));
3385
+ };
3386
+
3387
+
3388
+ /**
3389
+ * @param {?proto.Material|undefined} value
3390
+ * @return {!proto.UpdateMaterialResponse} returns this
3391
+ */
3392
+ proto.UpdateMaterialResponse.prototype.setMaterial = function(value) {
3393
+ return jspb.Message.setWrapperField(this, 1, value);
3394
+ };
3395
+
3396
+
3397
+ /**
3398
+ * Clears the message field making it undefined.
3399
+ * @return {!proto.UpdateMaterialResponse} returns this
3400
+ */
3401
+ proto.UpdateMaterialResponse.prototype.clearMaterial = function() {
3402
+ return this.setMaterial(undefined);
3403
+ };
3404
+
3405
+
3406
+ /**
3407
+ * Returns whether this field is set.
3408
+ * @return {boolean}
3409
+ */
3410
+ proto.UpdateMaterialResponse.prototype.hasMaterial = function() {
3411
+ return jspb.Message.getField(this, 1) != null;
3412
+ };
3413
+
3414
+
3415
+ /**
3416
+ * optional prisca.v1.global.meta.Meta meta = 2;
3417
+ * @return {?proto.prisca.v1.global.meta.Meta}
3418
+ */
3419
+ proto.UpdateMaterialResponse.prototype.getMeta = function() {
3420
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3421
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3422
+ };
3423
+
3424
+
3425
+ /**
3426
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3427
+ * @return {!proto.UpdateMaterialResponse} returns this
3428
+ */
3429
+ proto.UpdateMaterialResponse.prototype.setMeta = function(value) {
3430
+ return jspb.Message.setWrapperField(this, 2, value);
3431
+ };
3432
+
3433
+
3434
+ /**
3435
+ * Clears the message field making it undefined.
3436
+ * @return {!proto.UpdateMaterialResponse} returns this
3437
+ */
3438
+ proto.UpdateMaterialResponse.prototype.clearMeta = function() {
3439
+ return this.setMeta(undefined);
3440
+ };
3441
+
3442
+
3443
+ /**
3444
+ * Returns whether this field is set.
3445
+ * @return {boolean}
3446
+ */
3447
+ proto.UpdateMaterialResponse.prototype.hasMeta = function() {
3448
+ return jspb.Message.getField(this, 2) != null;
3449
+ };
3450
+
3451
+
3452
+
3453
+
3454
+
3455
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3456
+ /**
3457
+ * Creates an object representation of this proto.
3458
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3459
+ * Optional fields that are not set will be set to undefined.
3460
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3461
+ * For the list of reserved names please see:
3462
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3463
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3464
+ * JSPB instance for transitional soy proto support:
3465
+ * http://goto/soy-param-migration
3466
+ * @return {!Object}
3467
+ */
3468
+ proto.DeleteMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3469
+ return proto.DeleteMaterialResponse.toObject(opt_includeInstance, this);
3470
+ };
3471
+
3472
+
3473
+ /**
3474
+ * Static version of the {@see toObject} method.
3475
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3476
+ * the JSPB instance for transitional soy proto support:
3477
+ * http://goto/soy-param-migration
3478
+ * @param {!proto.DeleteMaterialResponse} msg The msg instance to transform.
3479
+ * @return {!Object}
3480
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3481
+ */
3482
+ proto.DeleteMaterialResponse.toObject = function(includeInstance, msg) {
3483
+ var f, obj = {
3484
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3485
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3486
+ };
3487
+
3488
+ if (includeInstance) {
3489
+ obj.$jspbMessageInstance = msg;
3490
+ }
3491
+ return obj;
3492
+ };
3493
+ }
3494
+
3495
+
3496
+ /**
3497
+ * Deserializes binary data (in protobuf wire format).
3498
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3499
+ * @return {!proto.DeleteMaterialResponse}
3500
+ */
3501
+ proto.DeleteMaterialResponse.deserializeBinary = function(bytes) {
3502
+ var reader = new jspb.BinaryReader(bytes);
3503
+ var msg = new proto.DeleteMaterialResponse;
3504
+ return proto.DeleteMaterialResponse.deserializeBinaryFromReader(msg, reader);
3505
+ };
3506
+
3507
+
3508
+ /**
3509
+ * Deserializes binary data (in protobuf wire format) from the
3510
+ * given reader into the given message object.
3511
+ * @param {!proto.DeleteMaterialResponse} msg The message object to deserialize into.
3512
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3513
+ * @return {!proto.DeleteMaterialResponse}
3514
+ */
3515
+ proto.DeleteMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3516
+ while (reader.nextField()) {
3517
+ if (reader.isEndGroup()) {
3518
+ break;
3519
+ }
3520
+ var field = reader.getFieldNumber();
3521
+ switch (field) {
3522
+ case 1:
3523
+ var value = /** @type {string} */ (reader.readString());
3524
+ msg.setReferencesId(value);
3525
+ break;
3526
+ case 2:
3527
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3528
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3529
+ msg.setMeta(value);
3530
+ break;
3531
+ default:
3532
+ reader.skipField();
3533
+ break;
3534
+ }
3535
+ }
3536
+ return msg;
3537
+ };
3538
+
3539
+
3540
+ /**
3541
+ * Serializes the message to binary data (in protobuf wire format).
3542
+ * @return {!Uint8Array}
3543
+ */
3544
+ proto.DeleteMaterialResponse.prototype.serializeBinary = function() {
3545
+ var writer = new jspb.BinaryWriter();
3546
+ proto.DeleteMaterialResponse.serializeBinaryToWriter(this, writer);
3547
+ return writer.getResultBuffer();
3548
+ };
3549
+
3550
+
3551
+ /**
3552
+ * Serializes the given message to binary data (in protobuf wire
3553
+ * format), writing to the given BinaryWriter.
3554
+ * @param {!proto.DeleteMaterialResponse} message
3555
+ * @param {!jspb.BinaryWriter} writer
3556
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3557
+ */
3558
+ proto.DeleteMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3559
+ var f = undefined;
3560
+ f = message.getReferencesId();
3561
+ if (f.length > 0) {
3562
+ writer.writeString(
3563
+ 1,
3564
+ f
3565
+ );
3566
+ }
3567
+ f = message.getMeta();
3568
+ if (f != null) {
3569
+ writer.writeMessage(
3570
+ 2,
3571
+ f,
3572
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3573
+ );
3574
+ }
3575
+ };
3576
+
3577
+
3578
+ /**
3579
+ * optional string references_id = 1;
3580
+ * @return {string}
3581
+ */
3582
+ proto.DeleteMaterialResponse.prototype.getReferencesId = function() {
3583
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3584
+ };
3585
+
3586
+
3587
+ /**
3588
+ * @param {string} value
3589
+ * @return {!proto.DeleteMaterialResponse} returns this
3590
+ */
3591
+ proto.DeleteMaterialResponse.prototype.setReferencesId = function(value) {
3592
+ return jspb.Message.setProto3StringField(this, 1, value);
3593
+ };
3594
+
3595
+
3596
+ /**
3597
+ * optional prisca.v1.global.meta.Meta meta = 2;
3598
+ * @return {?proto.prisca.v1.global.meta.Meta}
3599
+ */
3600
+ proto.DeleteMaterialResponse.prototype.getMeta = function() {
3601
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3602
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3603
+ };
3604
+
3605
+
3606
+ /**
3607
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3608
+ * @return {!proto.DeleteMaterialResponse} returns this
3609
+ */
3610
+ proto.DeleteMaterialResponse.prototype.setMeta = function(value) {
3611
+ return jspb.Message.setWrapperField(this, 2, value);
3612
+ };
3613
+
3614
+
3615
+ /**
3616
+ * Clears the message field making it undefined.
3617
+ * @return {!proto.DeleteMaterialResponse} returns this
3618
+ */
3619
+ proto.DeleteMaterialResponse.prototype.clearMeta = function() {
3620
+ return this.setMeta(undefined);
3621
+ };
3622
+
3623
+
3624
+ /**
3625
+ * Returns whether this field is set.
3626
+ * @return {boolean}
3627
+ */
3628
+ proto.DeleteMaterialResponse.prototype.hasMeta = function() {
3629
+ return jspb.Message.getField(this, 2) != null;
3630
+ };
3631
+
3632
+
3633
+
3634
+
3635
+
3636
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3637
+ /**
3638
+ * Creates an object representation of this proto.
3639
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3640
+ * Optional fields that are not set will be set to undefined.
3641
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3642
+ * For the list of reserved names please see:
3643
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3644
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3645
+ * JSPB instance for transitional soy proto support:
3646
+ * http://goto/soy-param-migration
3647
+ * @return {!Object}
3648
+ */
3649
+ proto.GetMaterialByIdResponse.prototype.toObject = function(opt_includeInstance) {
3650
+ return proto.GetMaterialByIdResponse.toObject(opt_includeInstance, this);
3651
+ };
3652
+
3653
+
3654
+ /**
3655
+ * Static version of the {@see toObject} method.
3656
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3657
+ * the JSPB instance for transitional soy proto support:
3658
+ * http://goto/soy-param-migration
3659
+ * @param {!proto.GetMaterialByIdResponse} msg The msg instance to transform.
3660
+ * @return {!Object}
3661
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3662
+ */
3663
+ proto.GetMaterialByIdResponse.toObject = function(includeInstance, msg) {
3664
+ var f, obj = {
3665
+ material: (f = msg.getMaterial()) && proto.Material.toObject(includeInstance, f),
3666
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3667
+ };
3668
+
3669
+ if (includeInstance) {
3670
+ obj.$jspbMessageInstance = msg;
3671
+ }
3672
+ return obj;
3673
+ };
3674
+ }
3675
+
3676
+
3677
+ /**
3678
+ * Deserializes binary data (in protobuf wire format).
3679
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3680
+ * @return {!proto.GetMaterialByIdResponse}
3681
+ */
3682
+ proto.GetMaterialByIdResponse.deserializeBinary = function(bytes) {
3683
+ var reader = new jspb.BinaryReader(bytes);
3684
+ var msg = new proto.GetMaterialByIdResponse;
3685
+ return proto.GetMaterialByIdResponse.deserializeBinaryFromReader(msg, reader);
3686
+ };
3687
+
3688
+
3689
+ /**
3690
+ * Deserializes binary data (in protobuf wire format) from the
3691
+ * given reader into the given message object.
3692
+ * @param {!proto.GetMaterialByIdResponse} msg The message object to deserialize into.
3693
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3694
+ * @return {!proto.GetMaterialByIdResponse}
3695
+ */
3696
+ proto.GetMaterialByIdResponse.deserializeBinaryFromReader = function(msg, reader) {
3697
+ while (reader.nextField()) {
3698
+ if (reader.isEndGroup()) {
3699
+ break;
3700
+ }
3701
+ var field = reader.getFieldNumber();
3702
+ switch (field) {
3703
+ case 1:
3704
+ var value = new proto.Material;
3705
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3706
+ msg.setMaterial(value);
3707
+ break;
3708
+ case 2:
3709
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3710
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3711
+ msg.setMeta(value);
3712
+ break;
3713
+ default:
3714
+ reader.skipField();
3715
+ break;
3716
+ }
3717
+ }
3718
+ return msg;
3719
+ };
3720
+
3721
+
3722
+ /**
3723
+ * Serializes the message to binary data (in protobuf wire format).
3724
+ * @return {!Uint8Array}
3725
+ */
3726
+ proto.GetMaterialByIdResponse.prototype.serializeBinary = function() {
3727
+ var writer = new jspb.BinaryWriter();
3728
+ proto.GetMaterialByIdResponse.serializeBinaryToWriter(this, writer);
3729
+ return writer.getResultBuffer();
3730
+ };
3731
+
3732
+
3733
+ /**
3734
+ * Serializes the given message to binary data (in protobuf wire
3735
+ * format), writing to the given BinaryWriter.
3736
+ * @param {!proto.GetMaterialByIdResponse} message
3737
+ * @param {!jspb.BinaryWriter} writer
3738
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3739
+ */
3740
+ proto.GetMaterialByIdResponse.serializeBinaryToWriter = function(message, writer) {
3741
+ var f = undefined;
3742
+ f = message.getMaterial();
3743
+ if (f != null) {
3744
+ writer.writeMessage(
3745
+ 1,
3746
+ f,
3747
+ proto.Material.serializeBinaryToWriter
3748
+ );
3749
+ }
3750
+ f = message.getMeta();
3751
+ if (f != null) {
3752
+ writer.writeMessage(
3753
+ 2,
3754
+ f,
3755
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3756
+ );
3757
+ }
3758
+ };
3759
+
3760
+
3761
+ /**
3762
+ * optional Material material = 1;
3763
+ * @return {?proto.Material}
3764
+ */
3765
+ proto.GetMaterialByIdResponse.prototype.getMaterial = function() {
3766
+ return /** @type{?proto.Material} */ (
3767
+ jspb.Message.getWrapperField(this, proto.Material, 1));
3768
+ };
3769
+
3770
+
3771
+ /**
3772
+ * @param {?proto.Material|undefined} value
3773
+ * @return {!proto.GetMaterialByIdResponse} returns this
3774
+ */
3775
+ proto.GetMaterialByIdResponse.prototype.setMaterial = function(value) {
3776
+ return jspb.Message.setWrapperField(this, 1, value);
3777
+ };
3778
+
3779
+
3780
+ /**
3781
+ * Clears the message field making it undefined.
3782
+ * @return {!proto.GetMaterialByIdResponse} returns this
3783
+ */
3784
+ proto.GetMaterialByIdResponse.prototype.clearMaterial = function() {
3785
+ return this.setMaterial(undefined);
3786
+ };
3787
+
3788
+
3789
+ /**
3790
+ * Returns whether this field is set.
3791
+ * @return {boolean}
3792
+ */
3793
+ proto.GetMaterialByIdResponse.prototype.hasMaterial = function() {
3794
+ return jspb.Message.getField(this, 1) != null;
3795
+ };
3796
+
3797
+
3798
+ /**
3799
+ * optional prisca.v1.global.meta.Meta meta = 2;
3800
+ * @return {?proto.prisca.v1.global.meta.Meta}
3801
+ */
3802
+ proto.GetMaterialByIdResponse.prototype.getMeta = function() {
3803
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
3804
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
3805
+ };
3806
+
3807
+
3808
+ /**
3809
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
3810
+ * @return {!proto.GetMaterialByIdResponse} returns this
3811
+ */
3812
+ proto.GetMaterialByIdResponse.prototype.setMeta = function(value) {
3813
+ return jspb.Message.setWrapperField(this, 2, value);
3814
+ };
3815
+
3816
+
3817
+ /**
3818
+ * Clears the message field making it undefined.
3819
+ * @return {!proto.GetMaterialByIdResponse} returns this
3820
+ */
3821
+ proto.GetMaterialByIdResponse.prototype.clearMeta = function() {
3822
+ return this.setMeta(undefined);
3823
+ };
3824
+
3825
+
3826
+ /**
3827
+ * Returns whether this field is set.
3828
+ * @return {boolean}
3829
+ */
3830
+ proto.GetMaterialByIdResponse.prototype.hasMeta = function() {
3831
+ return jspb.Message.getField(this, 2) != null;
3832
+ };
3833
+
3834
+
3835
+
3836
+ /**
3837
+ * List of repeated fields within this message type.
3838
+ * @private {!Array<number>}
3839
+ * @const
3840
+ */
3841
+ proto.GetListMaterialResponse.repeatedFields_ = [1];
3842
+
3843
+
3844
+
3845
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3846
+ /**
3847
+ * Creates an object representation of this proto.
3848
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3849
+ * Optional fields that are not set will be set to undefined.
3850
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3851
+ * For the list of reserved names please see:
3852
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3853
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3854
+ * JSPB instance for transitional soy proto support:
3855
+ * http://goto/soy-param-migration
3856
+ * @return {!Object}
3857
+ */
3858
+ proto.GetListMaterialResponse.prototype.toObject = function(opt_includeInstance) {
3859
+ return proto.GetListMaterialResponse.toObject(opt_includeInstance, this);
3860
+ };
3861
+
3862
+
3863
+ /**
3864
+ * Static version of the {@see toObject} method.
3865
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3866
+ * the JSPB instance for transitional soy proto support:
3867
+ * http://goto/soy-param-migration
3868
+ * @param {!proto.GetListMaterialResponse} msg The msg instance to transform.
3869
+ * @return {!Object}
3870
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3871
+ */
3872
+ proto.GetListMaterialResponse.toObject = function(includeInstance, msg) {
3873
+ var f, obj = {
3874
+ materialsList: jspb.Message.toObjectList(msg.getMaterialsList(),
3875
+ proto.Material.toObject, includeInstance),
3876
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
3877
+ };
3878
+
3879
+ if (includeInstance) {
3880
+ obj.$jspbMessageInstance = msg;
3881
+ }
3882
+ return obj;
3883
+ };
3884
+ }
3885
+
3886
+
3887
+ /**
3888
+ * Deserializes binary data (in protobuf wire format).
3889
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3890
+ * @return {!proto.GetListMaterialResponse}
3891
+ */
3892
+ proto.GetListMaterialResponse.deserializeBinary = function(bytes) {
3893
+ var reader = new jspb.BinaryReader(bytes);
3894
+ var msg = new proto.GetListMaterialResponse;
3895
+ return proto.GetListMaterialResponse.deserializeBinaryFromReader(msg, reader);
3896
+ };
3897
+
3898
+
3899
+ /**
3900
+ * Deserializes binary data (in protobuf wire format) from the
3901
+ * given reader into the given message object.
3902
+ * @param {!proto.GetListMaterialResponse} msg The message object to deserialize into.
3903
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3904
+ * @return {!proto.GetListMaterialResponse}
3905
+ */
3906
+ proto.GetListMaterialResponse.deserializeBinaryFromReader = function(msg, reader) {
3907
+ while (reader.nextField()) {
3908
+ if (reader.isEndGroup()) {
3909
+ break;
3910
+ }
3911
+ var field = reader.getFieldNumber();
3912
+ switch (field) {
3913
+ case 1:
3914
+ var value = new proto.Material;
3915
+ reader.readMessage(value,proto.Material.deserializeBinaryFromReader);
3916
+ msg.addMaterials(value);
3917
+ break;
3918
+ case 2:
3919
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
3920
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
3921
+ msg.setMeta(value);
3922
+ break;
3923
+ default:
3924
+ reader.skipField();
3925
+ break;
3926
+ }
3927
+ }
3928
+ return msg;
3929
+ };
3930
+
3931
+
3932
+ /**
3933
+ * Serializes the message to binary data (in protobuf wire format).
3934
+ * @return {!Uint8Array}
3935
+ */
3936
+ proto.GetListMaterialResponse.prototype.serializeBinary = function() {
3937
+ var writer = new jspb.BinaryWriter();
3938
+ proto.GetListMaterialResponse.serializeBinaryToWriter(this, writer);
3939
+ return writer.getResultBuffer();
3940
+ };
3941
+
3942
+
3943
+ /**
3944
+ * Serializes the given message to binary data (in protobuf wire
3945
+ * format), writing to the given BinaryWriter.
3946
+ * @param {!proto.GetListMaterialResponse} message
3947
+ * @param {!jspb.BinaryWriter} writer
3948
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3949
+ */
3950
+ proto.GetListMaterialResponse.serializeBinaryToWriter = function(message, writer) {
3951
+ var f = undefined;
3952
+ f = message.getMaterialsList();
3953
+ if (f.length > 0) {
3954
+ writer.writeRepeatedMessage(
3955
+ 1,
3956
+ f,
3957
+ proto.Material.serializeBinaryToWriter
3958
+ );
3959
+ }
3960
+ f = message.getMeta();
3961
+ if (f != null) {
3962
+ writer.writeMessage(
3963
+ 2,
3964
+ f,
3965
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
3966
+ );
3967
+ }
3968
+ };
3969
+
3970
+
3971
+ /**
3972
+ * repeated Material materials = 1;
3973
+ * @return {!Array<!proto.Material>}
3974
+ */
3975
+ proto.GetListMaterialResponse.prototype.getMaterialsList = function() {
3976
+ return /** @type{!Array<!proto.Material>} */ (
3977
+ jspb.Message.getRepeatedWrapperField(this, proto.Material, 1));
3978
+ };
3979
+
3980
+
3981
+ /**
3982
+ * @param {!Array<!proto.Material>} value
3983
+ * @return {!proto.GetListMaterialResponse} returns this
3984
+ */
3985
+ proto.GetListMaterialResponse.prototype.setMaterialsList = function(value) {
3986
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
3987
+ };
3988
+
3989
+
3990
+ /**
3991
+ * @param {!proto.Material=} opt_value
3992
+ * @param {number=} opt_index
3993
+ * @return {!proto.Material}
3994
+ */
3995
+ proto.GetListMaterialResponse.prototype.addMaterials = function(opt_value, opt_index) {
3996
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Material, opt_index);
3997
+ };
3998
+
3999
+
4000
+ /**
4001
+ * Clears the list making it empty but non-null.
4002
+ * @return {!proto.GetListMaterialResponse} returns this
4003
+ */
4004
+ proto.GetListMaterialResponse.prototype.clearMaterialsList = function() {
4005
+ return this.setMaterialsList([]);
4006
+ };
4007
+
4008
+
4009
+ /**
4010
+ * optional prisca.v1.global.meta.Meta meta = 2;
4011
+ * @return {?proto.prisca.v1.global.meta.Meta}
4012
+ */
4013
+ proto.GetListMaterialResponse.prototype.getMeta = function() {
4014
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
4015
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
4016
+ };
4017
+
4018
+
4019
+ /**
4020
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
4021
+ * @return {!proto.GetListMaterialResponse} returns this
4022
+ */
4023
+ proto.GetListMaterialResponse.prototype.setMeta = function(value) {
4024
+ return jspb.Message.setWrapperField(this, 2, value);
4025
+ };
4026
+
4027
+
4028
+ /**
4029
+ * Clears the message field making it undefined.
4030
+ * @return {!proto.GetListMaterialResponse} returns this
4031
+ */
4032
+ proto.GetListMaterialResponse.prototype.clearMeta = function() {
4033
+ return this.setMeta(undefined);
4034
+ };
4035
+
4036
+
4037
+ /**
4038
+ * Returns whether this field is set.
4039
+ * @return {boolean}
4040
+ */
4041
+ proto.GetListMaterialResponse.prototype.hasMeta = function() {
4042
+ return jspb.Message.getField(this, 2) != null;
4043
+ };
4044
+
4045
+
4046
+ goog.object.extend(exports, proto);