@aldiokta/protocgen 1.1.67 → 1.1.68

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 (74) hide show
  1. package/package.json +1 -1
  2. package/prisca/v1/audit_trail/audit_trail_grpc_pb.js +92 -0
  3. package/prisca/v1/audit_trail/audit_trail_pb.js +2107 -0
  4. package/prisca/v1/bidding/bidding_pb.js +61 -1
  5. package/prisca/v1/business_partner/business_partner_grpc_pb.js +334 -0
  6. package/prisca/v1/business_partner/business_partner_pb.js +5244 -0
  7. package/prisca/v1/core/bp_config/bp_config_grpc_pb.js +697 -0
  8. package/prisca/v1/core/bp_config/bp_config_pb.js +10812 -0
  9. package/prisca/v1/core/item_transaction/item_transaction_pb.js +340 -10
  10. package/prisca/v1/core/job_title/job_title_pb.js +31 -1
  11. package/prisca/v1/core/line_of_approval/line_of_approval_grpc_pb.js +73 -0
  12. package/prisca/v1/core/line_of_approval/line_of_approval_pb.js +2027 -0
  13. package/prisca/v1/core/material_sales/material_account_assignment_group_grpc_pb.js +183 -0
  14. package/prisca/v1/core/material_sales/material_account_assignment_group_pb.js +2658 -0
  15. package/prisca/v1/core/material_sales/material_division_grpc_pb.js +199 -0
  16. package/prisca/v1/core/material_sales/material_division_pb.js +2706 -0
  17. package/prisca/v1/core/material_sales/material_item_category_group_grpc_pb.js +183 -0
  18. package/prisca/v1/core/material_sales/material_item_category_group_pb.js +2658 -0
  19. package/prisca/v1/core/material_sales/material_plant_grpc_pb.js +193 -0
  20. package/prisca/v1/core/material_sales/material_plant_pb.js +2757 -0
  21. package/prisca/v1/core/material_sales/material_sales_eligibility_grpc_pb.js +62 -0
  22. package/prisca/v1/core/material_sales/material_sales_eligibility_pb.js +475 -0
  23. package/prisca/v1/core/material_sales/material_sales_org_grpc_pb.js +191 -0
  24. package/prisca/v1/core/material_sales/material_sales_org_pb.js +2937 -0
  25. package/prisca/v1/core/material_sales/material_tax_classification_grpc_pb.js +193 -0
  26. package/prisca/v1/core/material_sales/material_tax_classification_pb.js +2817 -0
  27. package/prisca/v1/core/material_sales/material_tax_classification_value_grpc_pb.js +194 -0
  28. package/prisca/v1/core/material_sales/material_tax_classification_value_pb.js +2868 -0
  29. package/prisca/v1/core/material_sales/material_withholding_tax_group_grpc_pb.js +188 -0
  30. package/prisca/v1/core/material_sales/material_withholding_tax_group_pb.js +2658 -0
  31. package/prisca/v1/core/sales_org/distribution_channel_grpc_pb.js +180 -0
  32. package/prisca/v1/core/sales_org/distribution_channel_pb.js +2658 -0
  33. package/prisca/v1/core/sales_org/sales_address_grpc_pb.js +1 -0
  34. package/prisca/v1/core/sales_org/sales_address_pb.js +380 -0
  35. package/prisca/v1/core/sales_org/sales_area_grpc_pb.js +157 -0
  36. package/prisca/v1/core/sales_org/sales_area_pb.js +2381 -0
  37. package/prisca/v1/core/sales_org/sales_division_grpc_pb.js +180 -0
  38. package/prisca/v1/core/sales_org/sales_division_pb.js +2658 -0
  39. package/prisca/v1/core/sales_org/sales_group_assignment_grpc_pb.js +151 -0
  40. package/prisca/v1/core/sales_org/sales_group_assignment_pb.js +2231 -0
  41. package/prisca/v1/core/sales_org/sales_group_grpc_pb.js +180 -0
  42. package/prisca/v1/core/sales_org/sales_group_pb.js +2658 -0
  43. package/prisca/v1/core/sales_org/sales_office_assignment_grpc_pb.js +151 -0
  44. package/prisca/v1/core/sales_org/sales_office_assignment_pb.js +2231 -0
  45. package/prisca/v1/core/sales_org/sales_office_grpc_pb.js +181 -0
  46. package/prisca/v1/core/sales_org/sales_office_pb.js +2762 -0
  47. package/prisca/v1/core/sales_org/sales_org_distribution_channel_grpc_pb.js +151 -0
  48. package/prisca/v1/core/sales_org/sales_org_distribution_channel_pb.js +2231 -0
  49. package/prisca/v1/core/sales_org/sales_org_division_grpc_pb.js +151 -0
  50. package/prisca/v1/core/sales_org/sales_org_division_pb.js +2231 -0
  51. package/prisca/v1/core/sales_org/sales_org_plant_grpc_pb.js +152 -0
  52. package/prisca/v1/core/sales_org/sales_org_plant_pb.js +2291 -0
  53. package/prisca/v1/core/sales_org/sales_organization_grpc_pb.js +181 -0
  54. package/prisca/v1/core/sales_org/sales_organization_pb.js +2822 -0
  55. package/prisca/v1/core/sales_org/shipping_point_grpc_pb.js +181 -0
  56. package/prisca/v1/core/sales_org/shipping_point_pb.js +2762 -0
  57. package/prisca/v1/core/sales_org/shipping_point_plant_grpc_pb.js +152 -0
  58. package/prisca/v1/core/sales_org/shipping_point_plant_pb.js +2231 -0
  59. package/prisca/v1/core/transaction_type/transaction_type_grpc_pb.js +147 -0
  60. package/prisca/v1/core/transaction_type/transaction_type_pb.js +2587 -0
  61. package/prisca/v1/customer/customer_grpc_pb.js +184 -0
  62. package/prisca/v1/customer/customer_pb.js +3498 -0
  63. package/prisca/v1/customer/customer_registration_grpc_pb.js +93 -0
  64. package/prisca/v1/customer/customer_registration_pb.js +1300 -0
  65. package/prisca/v1/customer/customer_sales_area_grpc_pb.js +256 -0
  66. package/prisca/v1/customer/customer_sales_area_pb.js +4681 -0
  67. package/prisca/v1/delivery_order/delivery_order_pb.js +61 -1
  68. package/prisca/v1/good_receipt/good_receipt_pb.js +31 -1
  69. package/prisca/v1/invoice/invoice_pb.js +62 -2
  70. package/prisca/v1/purchase_order/purchase_order_grpc_pb.js +87 -0
  71. package/prisca/v1/purchase_order/purchase_order_pb.js +1015 -5
  72. package/prisca/v1/purchase_requisition_trx/purchase_requisition_trx_pb.js +31 -1
  73. package/prisca/v1/request_for_quotation/request_for_quotation_pb.js +152 -2
  74. package/prisca/v1/vendor_domain/vendor_domain_pb.js +94 -15
@@ -0,0 +1,62 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var prisca_v1_core_material_sales_material_sales_eligibility_pb = require('../../../../prisca/v1/core/material_sales/material_sales_eligibility_pb.js');
6
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
7
+
8
+ function serialize_CheckMaterialSalesEligibilityRequest(arg) {
9
+ if (!(arg instanceof prisca_v1_core_material_sales_material_sales_eligibility_pb.CheckMaterialSalesEligibilityRequest)) {
10
+ throw new Error('Expected argument of type CheckMaterialSalesEligibilityRequest');
11
+ }
12
+ return Buffer.from(arg.serializeBinary());
13
+ }
14
+
15
+ function deserialize_CheckMaterialSalesEligibilityRequest(buffer_arg) {
16
+ return prisca_v1_core_material_sales_material_sales_eligibility_pb.CheckMaterialSalesEligibilityRequest.deserializeBinary(new Uint8Array(buffer_arg));
17
+ }
18
+
19
+ function serialize_CheckMaterialSalesEligibilityResponse(arg) {
20
+ if (!(arg instanceof prisca_v1_core_material_sales_material_sales_eligibility_pb.CheckMaterialSalesEligibilityResponse)) {
21
+ throw new Error('Expected argument of type CheckMaterialSalesEligibilityResponse');
22
+ }
23
+ return Buffer.from(arg.serializeBinary());
24
+ }
25
+
26
+ function deserialize_CheckMaterialSalesEligibilityResponse(buffer_arg) {
27
+ return prisca_v1_core_material_sales_material_sales_eligibility_pb.CheckMaterialSalesEligibilityResponse.deserializeBinary(new Uint8Array(buffer_arg));
28
+ }
29
+
30
+
31
+ // Aturan kelayakan material untuk satu sales area (PRISCA-168 AC-11).
32
+ //
33
+ // BELUM DIKONSUMSI DOKUMEN MANA PUN — Sales Order belum ada. Ia sengaja
34
+ // dibangun lebih dulu sebagai operasi yang dapat diuji, supaya dokumen O2C
35
+ // pertama menemukan kontrak yang sudah jadi alih-alih menulis ulang aturannya.
36
+ //
37
+ // Material layak untuk sebuah sales area bila KEDUANYA benar:
38
+ // 1. ada `material_sales_org` untuk pasangan (sales org, dist. channel)
39
+ // sales area itu; DAN
40
+ // 2. division sales area itu termasuk salah satu `material_division`.
41
+ //
42
+ // Catatan resolusi: `sales_area` menyimpan sales org, distribution channel,
43
+ // dan division sebagai TIGA kolom terpisah, sedangkan `material_sales_org`
44
+ // menunjuk satu `sales_org_distribution_channel_references_id`. Jadi
45
+ // pencocokan syarat 1 menempuh satu hop tambahan: dari tiga kolom sales area,
46
+ // cari baris `sales_org_distribution_channel` yang cocok, lalu bandingkan
47
+ // references_id-nya.
48
+ var MaterialSalesEligibilityServiceService = exports.MaterialSalesEligibilityServiceService = {
49
+ checkMaterialSalesEligibility: {
50
+ path: '/MaterialSalesEligibilityService/CheckMaterialSalesEligibility',
51
+ requestStream: false,
52
+ responseStream: false,
53
+ requestType: prisca_v1_core_material_sales_material_sales_eligibility_pb.CheckMaterialSalesEligibilityRequest,
54
+ responseType: prisca_v1_core_material_sales_material_sales_eligibility_pb.CheckMaterialSalesEligibilityResponse,
55
+ requestSerialize: serialize_CheckMaterialSalesEligibilityRequest,
56
+ requestDeserialize: deserialize_CheckMaterialSalesEligibilityRequest,
57
+ responseSerialize: serialize_CheckMaterialSalesEligibilityResponse,
58
+ responseDeserialize: deserialize_CheckMaterialSalesEligibilityResponse,
59
+ },
60
+ };
61
+
62
+ exports.MaterialSalesEligibilityServiceClient = grpc.makeGenericClientConstructor(MaterialSalesEligibilityServiceService, 'MaterialSalesEligibilityService');
@@ -0,0 +1,475 @@
1
+ // source: prisca/v1/core/material_sales/material_sales_eligibility.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = globalThis;
17
+
18
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
19
+ goog.object.extend(proto, prisca_v1_global_meta_meta_pb);
20
+ goog.exportSymbol('proto.CheckMaterialSalesEligibilityRequest', null, global);
21
+ goog.exportSymbol('proto.CheckMaterialSalesEligibilityResponse', null, global);
22
+ goog.exportSymbol('proto.CheckMaterialSalesEligibilityResponse.Reason', null, global);
23
+ /**
24
+ * Generated by JsPbCodeGenerator.
25
+ * @param {Array=} opt_data Optional initial data array, typically from a
26
+ * server response, or constructed directly in Javascript. The array is used
27
+ * in place and becomes part of the constructed object. It is not cloned.
28
+ * If no data is provided, the constructed object will be empty, but still
29
+ * valid.
30
+ * @extends {jspb.Message}
31
+ * @constructor
32
+ */
33
+ proto.CheckMaterialSalesEligibilityRequest = function(opt_data) {
34
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
35
+ };
36
+ goog.inherits(proto.CheckMaterialSalesEligibilityRequest, jspb.Message);
37
+ if (goog.DEBUG && !COMPILED) {
38
+ /**
39
+ * @public
40
+ * @override
41
+ */
42
+ proto.CheckMaterialSalesEligibilityRequest.displayName = 'proto.CheckMaterialSalesEligibilityRequest';
43
+ }
44
+ /**
45
+ * Generated by JsPbCodeGenerator.
46
+ * @param {Array=} opt_data Optional initial data array, typically from a
47
+ * server response, or constructed directly in Javascript. The array is used
48
+ * in place and becomes part of the constructed object. It is not cloned.
49
+ * If no data is provided, the constructed object will be empty, but still
50
+ * valid.
51
+ * @extends {jspb.Message}
52
+ * @constructor
53
+ */
54
+ proto.CheckMaterialSalesEligibilityResponse = function(opt_data) {
55
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
56
+ };
57
+ goog.inherits(proto.CheckMaterialSalesEligibilityResponse, jspb.Message);
58
+ if (goog.DEBUG && !COMPILED) {
59
+ /**
60
+ * @public
61
+ * @override
62
+ */
63
+ proto.CheckMaterialSalesEligibilityResponse.displayName = 'proto.CheckMaterialSalesEligibilityResponse';
64
+ }
65
+
66
+
67
+
68
+ if (jspb.Message.GENERATE_TO_OBJECT) {
69
+ /**
70
+ * Creates an object representation of this proto.
71
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
72
+ * Optional fields that are not set will be set to undefined.
73
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
74
+ * For the list of reserved names please see:
75
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
76
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
77
+ * JSPB instance for transitional soy proto support:
78
+ * http://goto/soy-param-migration
79
+ * @return {!Object}
80
+ */
81
+ proto.CheckMaterialSalesEligibilityRequest.prototype.toObject = function(opt_includeInstance) {
82
+ return proto.CheckMaterialSalesEligibilityRequest.toObject(opt_includeInstance, this);
83
+ };
84
+
85
+
86
+ /**
87
+ * Static version of the {@see toObject} method.
88
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
89
+ * the JSPB instance for transitional soy proto support:
90
+ * http://goto/soy-param-migration
91
+ * @param {!proto.CheckMaterialSalesEligibilityRequest} msg The msg instance to transform.
92
+ * @return {!Object}
93
+ * @suppress {unusedLocalVariables} f is only used for nested messages
94
+ */
95
+ proto.CheckMaterialSalesEligibilityRequest.toObject = function(includeInstance, msg) {
96
+ var f, obj = {
97
+ materialReferencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
98
+ salesAreaReferencesId: jspb.Message.getFieldWithDefault(msg, 2, "")
99
+ };
100
+
101
+ if (includeInstance) {
102
+ obj.$jspbMessageInstance = msg;
103
+ }
104
+ return obj;
105
+ };
106
+ }
107
+
108
+
109
+ /**
110
+ * Deserializes binary data (in protobuf wire format).
111
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
112
+ * @return {!proto.CheckMaterialSalesEligibilityRequest}
113
+ */
114
+ proto.CheckMaterialSalesEligibilityRequest.deserializeBinary = function(bytes) {
115
+ var reader = new jspb.BinaryReader(bytes);
116
+ var msg = new proto.CheckMaterialSalesEligibilityRequest;
117
+ return proto.CheckMaterialSalesEligibilityRequest.deserializeBinaryFromReader(msg, reader);
118
+ };
119
+
120
+
121
+ /**
122
+ * Deserializes binary data (in protobuf wire format) from the
123
+ * given reader into the given message object.
124
+ * @param {!proto.CheckMaterialSalesEligibilityRequest} msg The message object to deserialize into.
125
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
126
+ * @return {!proto.CheckMaterialSalesEligibilityRequest}
127
+ */
128
+ proto.CheckMaterialSalesEligibilityRequest.deserializeBinaryFromReader = function(msg, reader) {
129
+ while (reader.nextField()) {
130
+ if (reader.isEndGroup()) {
131
+ break;
132
+ }
133
+ var field = reader.getFieldNumber();
134
+ switch (field) {
135
+ case 1:
136
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
137
+ msg.setMaterialReferencesId(value);
138
+ break;
139
+ case 2:
140
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
141
+ msg.setSalesAreaReferencesId(value);
142
+ break;
143
+ default:
144
+ reader.skipField();
145
+ break;
146
+ }
147
+ }
148
+ return msg;
149
+ };
150
+
151
+
152
+ /**
153
+ * Serializes the message to binary data (in protobuf wire format).
154
+ * @return {!Uint8Array}
155
+ */
156
+ proto.CheckMaterialSalesEligibilityRequest.prototype.serializeBinary = function() {
157
+ var writer = new jspb.BinaryWriter();
158
+ proto.CheckMaterialSalesEligibilityRequest.serializeBinaryToWriter(this, writer);
159
+ return writer.getResultBuffer();
160
+ };
161
+
162
+
163
+ /**
164
+ * Serializes the given message to binary data (in protobuf wire
165
+ * format), writing to the given BinaryWriter.
166
+ * @param {!proto.CheckMaterialSalesEligibilityRequest} message
167
+ * @param {!jspb.BinaryWriter} writer
168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
169
+ */
170
+ proto.CheckMaterialSalesEligibilityRequest.serializeBinaryToWriter = function(message, writer) {
171
+ var f = undefined;
172
+ f = message.getMaterialReferencesId();
173
+ if (f.length > 0) {
174
+ writer.writeString(
175
+ 1,
176
+ f
177
+ );
178
+ }
179
+ f = message.getSalesAreaReferencesId();
180
+ if (f.length > 0) {
181
+ writer.writeString(
182
+ 2,
183
+ f
184
+ );
185
+ }
186
+ };
187
+
188
+
189
+ /**
190
+ * optional string material_references_id = 1;
191
+ * @return {string}
192
+ */
193
+ proto.CheckMaterialSalesEligibilityRequest.prototype.getMaterialReferencesId = function() {
194
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
195
+ };
196
+
197
+
198
+ /**
199
+ * @param {string} value
200
+ * @return {!proto.CheckMaterialSalesEligibilityRequest} returns this
201
+ */
202
+ proto.CheckMaterialSalesEligibilityRequest.prototype.setMaterialReferencesId = function(value) {
203
+ return jspb.Message.setProto3StringField(this, 1, value);
204
+ };
205
+
206
+
207
+ /**
208
+ * optional string sales_area_references_id = 2;
209
+ * @return {string}
210
+ */
211
+ proto.CheckMaterialSalesEligibilityRequest.prototype.getSalesAreaReferencesId = function() {
212
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
213
+ };
214
+
215
+
216
+ /**
217
+ * @param {string} value
218
+ * @return {!proto.CheckMaterialSalesEligibilityRequest} returns this
219
+ */
220
+ proto.CheckMaterialSalesEligibilityRequest.prototype.setSalesAreaReferencesId = function(value) {
221
+ return jspb.Message.setProto3StringField(this, 2, value);
222
+ };
223
+
224
+
225
+
226
+
227
+
228
+ if (jspb.Message.GENERATE_TO_OBJECT) {
229
+ /**
230
+ * Creates an object representation of this proto.
231
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
232
+ * Optional fields that are not set will be set to undefined.
233
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
234
+ * For the list of reserved names please see:
235
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
236
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
237
+ * JSPB instance for transitional soy proto support:
238
+ * http://goto/soy-param-migration
239
+ * @return {!Object}
240
+ */
241
+ proto.CheckMaterialSalesEligibilityResponse.prototype.toObject = function(opt_includeInstance) {
242
+ return proto.CheckMaterialSalesEligibilityResponse.toObject(opt_includeInstance, this);
243
+ };
244
+
245
+
246
+ /**
247
+ * Static version of the {@see toObject} method.
248
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
249
+ * the JSPB instance for transitional soy proto support:
250
+ * http://goto/soy-param-migration
251
+ * @param {!proto.CheckMaterialSalesEligibilityResponse} msg The msg instance to transform.
252
+ * @return {!Object}
253
+ * @suppress {unusedLocalVariables} f is only used for nested messages
254
+ */
255
+ proto.CheckMaterialSalesEligibilityResponse.toObject = function(includeInstance, msg) {
256
+ var f, obj = {
257
+ eligible: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
258
+ reason: jspb.Message.getFieldWithDefault(msg, 2, 0),
259
+ reasonMessage: jspb.Message.getFieldWithDefault(msg, 3, ""),
260
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
261
+ };
262
+
263
+ if (includeInstance) {
264
+ obj.$jspbMessageInstance = msg;
265
+ }
266
+ return obj;
267
+ };
268
+ }
269
+
270
+
271
+ /**
272
+ * Deserializes binary data (in protobuf wire format).
273
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
274
+ * @return {!proto.CheckMaterialSalesEligibilityResponse}
275
+ */
276
+ proto.CheckMaterialSalesEligibilityResponse.deserializeBinary = function(bytes) {
277
+ var reader = new jspb.BinaryReader(bytes);
278
+ var msg = new proto.CheckMaterialSalesEligibilityResponse;
279
+ return proto.CheckMaterialSalesEligibilityResponse.deserializeBinaryFromReader(msg, reader);
280
+ };
281
+
282
+
283
+ /**
284
+ * Deserializes binary data (in protobuf wire format) from the
285
+ * given reader into the given message object.
286
+ * @param {!proto.CheckMaterialSalesEligibilityResponse} msg The message object to deserialize into.
287
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
288
+ * @return {!proto.CheckMaterialSalesEligibilityResponse}
289
+ */
290
+ proto.CheckMaterialSalesEligibilityResponse.deserializeBinaryFromReader = function(msg, reader) {
291
+ while (reader.nextField()) {
292
+ if (reader.isEndGroup()) {
293
+ break;
294
+ }
295
+ var field = reader.getFieldNumber();
296
+ switch (field) {
297
+ case 1:
298
+ var value = /** @type {boolean} */ (reader.readBool());
299
+ msg.setEligible(value);
300
+ break;
301
+ case 2:
302
+ var value = /** @type {!proto.CheckMaterialSalesEligibilityResponse.Reason} */ (reader.readEnum());
303
+ msg.setReason(value);
304
+ break;
305
+ case 3:
306
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
307
+ msg.setReasonMessage(value);
308
+ break;
309
+ case 4:
310
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
311
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
312
+ msg.setMeta(value);
313
+ break;
314
+ default:
315
+ reader.skipField();
316
+ break;
317
+ }
318
+ }
319
+ return msg;
320
+ };
321
+
322
+
323
+ /**
324
+ * Serializes the message to binary data (in protobuf wire format).
325
+ * @return {!Uint8Array}
326
+ */
327
+ proto.CheckMaterialSalesEligibilityResponse.prototype.serializeBinary = function() {
328
+ var writer = new jspb.BinaryWriter();
329
+ proto.CheckMaterialSalesEligibilityResponse.serializeBinaryToWriter(this, writer);
330
+ return writer.getResultBuffer();
331
+ };
332
+
333
+
334
+ /**
335
+ * Serializes the given message to binary data (in protobuf wire
336
+ * format), writing to the given BinaryWriter.
337
+ * @param {!proto.CheckMaterialSalesEligibilityResponse} message
338
+ * @param {!jspb.BinaryWriter} writer
339
+ * @suppress {unusedLocalVariables} f is only used for nested messages
340
+ */
341
+ proto.CheckMaterialSalesEligibilityResponse.serializeBinaryToWriter = function(message, writer) {
342
+ var f = undefined;
343
+ f = message.getEligible();
344
+ if (f) {
345
+ writer.writeBool(
346
+ 1,
347
+ f
348
+ );
349
+ }
350
+ f = message.getReason();
351
+ if (f !== 0.0) {
352
+ writer.writeEnum(
353
+ 2,
354
+ f
355
+ );
356
+ }
357
+ f = message.getReasonMessage();
358
+ if (f.length > 0) {
359
+ writer.writeString(
360
+ 3,
361
+ f
362
+ );
363
+ }
364
+ f = message.getMeta();
365
+ if (f != null) {
366
+ writer.writeMessage(
367
+ 4,
368
+ f,
369
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
370
+ );
371
+ }
372
+ };
373
+
374
+
375
+ /**
376
+ * @enum {number}
377
+ */
378
+ proto.CheckMaterialSalesEligibilityResponse.Reason = {
379
+ REASON_UNSPECIFIED: 0,
380
+ NO_SALES_ORG_EXTENSION: 1,
381
+ DIVISION_NOT_EXTENDED: 2
382
+ };
383
+
384
+ /**
385
+ * optional bool eligible = 1;
386
+ * @return {boolean}
387
+ */
388
+ proto.CheckMaterialSalesEligibilityResponse.prototype.getEligible = function() {
389
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
390
+ };
391
+
392
+
393
+ /**
394
+ * @param {boolean} value
395
+ * @return {!proto.CheckMaterialSalesEligibilityResponse} returns this
396
+ */
397
+ proto.CheckMaterialSalesEligibilityResponse.prototype.setEligible = function(value) {
398
+ return jspb.Message.setProto3BooleanField(this, 1, value);
399
+ };
400
+
401
+
402
+ /**
403
+ * optional Reason reason = 2;
404
+ * @return {!proto.CheckMaterialSalesEligibilityResponse.Reason}
405
+ */
406
+ proto.CheckMaterialSalesEligibilityResponse.prototype.getReason = function() {
407
+ return /** @type {!proto.CheckMaterialSalesEligibilityResponse.Reason} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
408
+ };
409
+
410
+
411
+ /**
412
+ * @param {!proto.CheckMaterialSalesEligibilityResponse.Reason} value
413
+ * @return {!proto.CheckMaterialSalesEligibilityResponse} returns this
414
+ */
415
+ proto.CheckMaterialSalesEligibilityResponse.prototype.setReason = function(value) {
416
+ return jspb.Message.setProto3EnumField(this, 2, value);
417
+ };
418
+
419
+
420
+ /**
421
+ * optional string reason_message = 3;
422
+ * @return {string}
423
+ */
424
+ proto.CheckMaterialSalesEligibilityResponse.prototype.getReasonMessage = function() {
425
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
426
+ };
427
+
428
+
429
+ /**
430
+ * @param {string} value
431
+ * @return {!proto.CheckMaterialSalesEligibilityResponse} returns this
432
+ */
433
+ proto.CheckMaterialSalesEligibilityResponse.prototype.setReasonMessage = function(value) {
434
+ return jspb.Message.setProto3StringField(this, 3, value);
435
+ };
436
+
437
+
438
+ /**
439
+ * optional prisca.v1.global.meta.Meta meta = 4;
440
+ * @return {?proto.prisca.v1.global.meta.Meta}
441
+ */
442
+ proto.CheckMaterialSalesEligibilityResponse.prototype.getMeta = function() {
443
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
444
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 4));
445
+ };
446
+
447
+
448
+ /**
449
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
450
+ * @return {!proto.CheckMaterialSalesEligibilityResponse} returns this
451
+ */
452
+ proto.CheckMaterialSalesEligibilityResponse.prototype.setMeta = function(value) {
453
+ return jspb.Message.setWrapperField(this, 4, value);
454
+ };
455
+
456
+
457
+ /**
458
+ * Clears the message field making it undefined.
459
+ * @return {!proto.CheckMaterialSalesEligibilityResponse} returns this
460
+ */
461
+ proto.CheckMaterialSalesEligibilityResponse.prototype.clearMeta = function() {
462
+ return this.setMeta(undefined);
463
+ };
464
+
465
+
466
+ /**
467
+ * Returns whether this field is set.
468
+ * @return {boolean}
469
+ */
470
+ proto.CheckMaterialSalesEligibilityResponse.prototype.hasMeta = function() {
471
+ return jspb.Message.getField(this, 4) != null;
472
+ };
473
+
474
+
475
+ goog.object.extend(exports, proto);