@aldiokta/protocgen 1.1.62 → 1.1.63

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.
@@ -44,6 +44,9 @@ goog.exportSymbol('proto.Material', null, global);
44
44
  goog.exportSymbol('proto.MaterialLanguageDescription', null, global);
45
45
  goog.exportSymbol('proto.MaterialUOM', null, global);
46
46
  goog.exportSymbol('proto.MaterialUOMRequest', null, global);
47
+ goog.exportSymbol('proto.SyncMaterialsToAccurateItemResult', null, global);
48
+ goog.exportSymbol('proto.SyncMaterialsToAccurateRequest', null, global);
49
+ goog.exportSymbol('proto.SyncMaterialsToAccurateResponse', null, global);
47
50
  goog.exportSymbol('proto.UpdateMaterialRequest', null, global);
48
51
  goog.exportSymbol('proto.UpdateMaterialResponse', null, global);
49
52
  /**
@@ -361,6 +364,69 @@ if (goog.DEBUG && !COMPILED) {
361
364
  */
362
365
  proto.GetListMaterialResponse.displayName = 'proto.GetListMaterialResponse';
363
366
  }
367
+ /**
368
+ * Generated by JsPbCodeGenerator.
369
+ * @param {Array=} opt_data Optional initial data array, typically from a
370
+ * server response, or constructed directly in Javascript. The array is used
371
+ * in place and becomes part of the constructed object. It is not cloned.
372
+ * If no data is provided, the constructed object will be empty, but still
373
+ * valid.
374
+ * @extends {jspb.Message}
375
+ * @constructor
376
+ */
377
+ proto.SyncMaterialsToAccurateRequest = function(opt_data) {
378
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
379
+ };
380
+ goog.inherits(proto.SyncMaterialsToAccurateRequest, jspb.Message);
381
+ if (goog.DEBUG && !COMPILED) {
382
+ /**
383
+ * @public
384
+ * @override
385
+ */
386
+ proto.SyncMaterialsToAccurateRequest.displayName = 'proto.SyncMaterialsToAccurateRequest';
387
+ }
388
+ /**
389
+ * Generated by JsPbCodeGenerator.
390
+ * @param {Array=} opt_data Optional initial data array, typically from a
391
+ * server response, or constructed directly in Javascript. The array is used
392
+ * in place and becomes part of the constructed object. It is not cloned.
393
+ * If no data is provided, the constructed object will be empty, but still
394
+ * valid.
395
+ * @extends {jspb.Message}
396
+ * @constructor
397
+ */
398
+ proto.SyncMaterialsToAccurateItemResult = function(opt_data) {
399
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
400
+ };
401
+ goog.inherits(proto.SyncMaterialsToAccurateItemResult, jspb.Message);
402
+ if (goog.DEBUG && !COMPILED) {
403
+ /**
404
+ * @public
405
+ * @override
406
+ */
407
+ proto.SyncMaterialsToAccurateItemResult.displayName = 'proto.SyncMaterialsToAccurateItemResult';
408
+ }
409
+ /**
410
+ * Generated by JsPbCodeGenerator.
411
+ * @param {Array=} opt_data Optional initial data array, typically from a
412
+ * server response, or constructed directly in Javascript. The array is used
413
+ * in place and becomes part of the constructed object. It is not cloned.
414
+ * If no data is provided, the constructed object will be empty, but still
415
+ * valid.
416
+ * @extends {jspb.Message}
417
+ * @constructor
418
+ */
419
+ proto.SyncMaterialsToAccurateResponse = function(opt_data) {
420
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.SyncMaterialsToAccurateResponse.repeatedFields_, null);
421
+ };
422
+ goog.inherits(proto.SyncMaterialsToAccurateResponse, jspb.Message);
423
+ if (goog.DEBUG && !COMPILED) {
424
+ /**
425
+ * @public
426
+ * @override
427
+ */
428
+ proto.SyncMaterialsToAccurateResponse.displayName = 'proto.SyncMaterialsToAccurateResponse';
429
+ }
364
430
 
365
431
  /**
366
432
  * List of repeated fields within this message type.
@@ -431,7 +497,8 @@ unitOfIssued: (f = msg.getUnitOfIssued()) && prisca_v1_core_unit_of_measurement_
431
497
  quantityConversion: jspb.Message.getFloatingPointFieldWithDefault(msg, 27, 0.0),
432
498
  currency: (f = msg.getCurrency()) && prisca_v1_core_currency_currency_pb.Currency.toObject(includeInstance, f),
433
499
  brand: jspb.Message.getFieldWithDefault(msg, 29, ""),
434
- commodity: (f = msg.getCommodity()) && prisca_v1_core_commodity_commodity_pb.Commodity.toObject(includeInstance, f)
500
+ commodity: (f = msg.getCommodity()) && prisca_v1_core_commodity_commodity_pb.Commodity.toObject(includeInstance, f),
501
+ customTransaction: jspb.Message.getFieldWithDefault(msg, 31, "")
435
502
  };
436
503
 
437
504
  if (includeInstance) {
@@ -600,6 +667,10 @@ proto.Material.deserializeBinaryFromReader = function(msg, reader) {
600
667
  reader.readMessage(value,prisca_v1_core_commodity_commodity_pb.Commodity.deserializeBinaryFromReader);
601
668
  msg.setCommodity(value);
602
669
  break;
670
+ case 31:
671
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
672
+ msg.setCustomTransaction(value);
673
+ break;
603
674
  default:
604
675
  reader.skipField();
605
676
  break;
@@ -851,6 +922,13 @@ proto.Material.serializeBinaryToWriter = function(message, writer) {
851
922
  prisca_v1_core_commodity_commodity_pb.Commodity.serializeBinaryToWriter
852
923
  );
853
924
  }
925
+ f = message.getCustomTransaction();
926
+ if (f.length > 0) {
927
+ writer.writeString(
928
+ 31,
929
+ f
930
+ );
931
+ }
854
932
  };
855
933
 
856
934
 
@@ -1624,6 +1702,24 @@ proto.Material.prototype.hasCommodity = function() {
1624
1702
  };
1625
1703
 
1626
1704
 
1705
+ /**
1706
+ * optional string custom_transaction = 31;
1707
+ * @return {string}
1708
+ */
1709
+ proto.Material.prototype.getCustomTransaction = function() {
1710
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 31, ""));
1711
+ };
1712
+
1713
+
1714
+ /**
1715
+ * @param {string} value
1716
+ * @return {!proto.Material} returns this
1717
+ */
1718
+ proto.Material.prototype.setCustomTransaction = function(value) {
1719
+ return jspb.Message.setProto3StringField(this, 31, value);
1720
+ };
1721
+
1722
+
1627
1723
 
1628
1724
 
1629
1725
 
@@ -4641,4 +4737,694 @@ proto.GetListMaterialResponse.prototype.hasMeta = function() {
4641
4737
  };
4642
4738
 
4643
4739
 
4740
+
4741
+
4742
+
4743
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4744
+ /**
4745
+ * Creates an object representation of this proto.
4746
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4747
+ * Optional fields that are not set will be set to undefined.
4748
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4749
+ * For the list of reserved names please see:
4750
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4751
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4752
+ * JSPB instance for transitional soy proto support:
4753
+ * http://goto/soy-param-migration
4754
+ * @return {!Object}
4755
+ */
4756
+ proto.SyncMaterialsToAccurateRequest.prototype.toObject = function(opt_includeInstance) {
4757
+ return proto.SyncMaterialsToAccurateRequest.toObject(opt_includeInstance, this);
4758
+ };
4759
+
4760
+
4761
+ /**
4762
+ * Static version of the {@see toObject} method.
4763
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4764
+ * the JSPB instance for transitional soy proto support:
4765
+ * http://goto/soy-param-migration
4766
+ * @param {!proto.SyncMaterialsToAccurateRequest} msg The msg instance to transform.
4767
+ * @return {!Object}
4768
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4769
+ */
4770
+ proto.SyncMaterialsToAccurateRequest.toObject = function(includeInstance, msg) {
4771
+ var f, obj = {
4772
+ integrationReferencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
4773
+ limit: jspb.Message.getFieldWithDefault(msg, 2, 0),
4774
+ dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
4775
+ };
4776
+
4777
+ if (includeInstance) {
4778
+ obj.$jspbMessageInstance = msg;
4779
+ }
4780
+ return obj;
4781
+ };
4782
+ }
4783
+
4784
+
4785
+ /**
4786
+ * Deserializes binary data (in protobuf wire format).
4787
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4788
+ * @return {!proto.SyncMaterialsToAccurateRequest}
4789
+ */
4790
+ proto.SyncMaterialsToAccurateRequest.deserializeBinary = function(bytes) {
4791
+ var reader = new jspb.BinaryReader(bytes);
4792
+ var msg = new proto.SyncMaterialsToAccurateRequest;
4793
+ return proto.SyncMaterialsToAccurateRequest.deserializeBinaryFromReader(msg, reader);
4794
+ };
4795
+
4796
+
4797
+ /**
4798
+ * Deserializes binary data (in protobuf wire format) from the
4799
+ * given reader into the given message object.
4800
+ * @param {!proto.SyncMaterialsToAccurateRequest} msg The message object to deserialize into.
4801
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4802
+ * @return {!proto.SyncMaterialsToAccurateRequest}
4803
+ */
4804
+ proto.SyncMaterialsToAccurateRequest.deserializeBinaryFromReader = function(msg, reader) {
4805
+ while (reader.nextField()) {
4806
+ if (reader.isEndGroup()) {
4807
+ break;
4808
+ }
4809
+ var field = reader.getFieldNumber();
4810
+ switch (field) {
4811
+ case 1:
4812
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
4813
+ msg.setIntegrationReferencesId(value);
4814
+ break;
4815
+ case 2:
4816
+ var value = /** @type {number} */ (reader.readInt32());
4817
+ msg.setLimit(value);
4818
+ break;
4819
+ case 3:
4820
+ var value = /** @type {boolean} */ (reader.readBool());
4821
+ msg.setDryRun(value);
4822
+ break;
4823
+ default:
4824
+ reader.skipField();
4825
+ break;
4826
+ }
4827
+ }
4828
+ return msg;
4829
+ };
4830
+
4831
+
4832
+ /**
4833
+ * Serializes the message to binary data (in protobuf wire format).
4834
+ * @return {!Uint8Array}
4835
+ */
4836
+ proto.SyncMaterialsToAccurateRequest.prototype.serializeBinary = function() {
4837
+ var writer = new jspb.BinaryWriter();
4838
+ proto.SyncMaterialsToAccurateRequest.serializeBinaryToWriter(this, writer);
4839
+ return writer.getResultBuffer();
4840
+ };
4841
+
4842
+
4843
+ /**
4844
+ * Serializes the given message to binary data (in protobuf wire
4845
+ * format), writing to the given BinaryWriter.
4846
+ * @param {!proto.SyncMaterialsToAccurateRequest} message
4847
+ * @param {!jspb.BinaryWriter} writer
4848
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4849
+ */
4850
+ proto.SyncMaterialsToAccurateRequest.serializeBinaryToWriter = function(message, writer) {
4851
+ var f = undefined;
4852
+ f = message.getIntegrationReferencesId();
4853
+ if (f.length > 0) {
4854
+ writer.writeString(
4855
+ 1,
4856
+ f
4857
+ );
4858
+ }
4859
+ f = message.getLimit();
4860
+ if (f !== 0) {
4861
+ writer.writeInt32(
4862
+ 2,
4863
+ f
4864
+ );
4865
+ }
4866
+ f = message.getDryRun();
4867
+ if (f) {
4868
+ writer.writeBool(
4869
+ 3,
4870
+ f
4871
+ );
4872
+ }
4873
+ };
4874
+
4875
+
4876
+ /**
4877
+ * optional string integration_references_id = 1;
4878
+ * @return {string}
4879
+ */
4880
+ proto.SyncMaterialsToAccurateRequest.prototype.getIntegrationReferencesId = function() {
4881
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4882
+ };
4883
+
4884
+
4885
+ /**
4886
+ * @param {string} value
4887
+ * @return {!proto.SyncMaterialsToAccurateRequest} returns this
4888
+ */
4889
+ proto.SyncMaterialsToAccurateRequest.prototype.setIntegrationReferencesId = function(value) {
4890
+ return jspb.Message.setProto3StringField(this, 1, value);
4891
+ };
4892
+
4893
+
4894
+ /**
4895
+ * optional int32 limit = 2;
4896
+ * @return {number}
4897
+ */
4898
+ proto.SyncMaterialsToAccurateRequest.prototype.getLimit = function() {
4899
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4900
+ };
4901
+
4902
+
4903
+ /**
4904
+ * @param {number} value
4905
+ * @return {!proto.SyncMaterialsToAccurateRequest} returns this
4906
+ */
4907
+ proto.SyncMaterialsToAccurateRequest.prototype.setLimit = function(value) {
4908
+ return jspb.Message.setProto3IntField(this, 2, value);
4909
+ };
4910
+
4911
+
4912
+ /**
4913
+ * optional bool dry_run = 3;
4914
+ * @return {boolean}
4915
+ */
4916
+ proto.SyncMaterialsToAccurateRequest.prototype.getDryRun = function() {
4917
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
4918
+ };
4919
+
4920
+
4921
+ /**
4922
+ * @param {boolean} value
4923
+ * @return {!proto.SyncMaterialsToAccurateRequest} returns this
4924
+ */
4925
+ proto.SyncMaterialsToAccurateRequest.prototype.setDryRun = function(value) {
4926
+ return jspb.Message.setProto3BooleanField(this, 3, value);
4927
+ };
4928
+
4929
+
4930
+
4931
+
4932
+
4933
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4934
+ /**
4935
+ * Creates an object representation of this proto.
4936
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4937
+ * Optional fields that are not set will be set to undefined.
4938
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4939
+ * For the list of reserved names please see:
4940
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4941
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4942
+ * JSPB instance for transitional soy proto support:
4943
+ * http://goto/soy-param-migration
4944
+ * @return {!Object}
4945
+ */
4946
+ proto.SyncMaterialsToAccurateItemResult.prototype.toObject = function(opt_includeInstance) {
4947
+ return proto.SyncMaterialsToAccurateItemResult.toObject(opt_includeInstance, this);
4948
+ };
4949
+
4950
+
4951
+ /**
4952
+ * Static version of the {@see toObject} method.
4953
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4954
+ * the JSPB instance for transitional soy proto support:
4955
+ * http://goto/soy-param-migration
4956
+ * @param {!proto.SyncMaterialsToAccurateItemResult} msg The msg instance to transform.
4957
+ * @return {!Object}
4958
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4959
+ */
4960
+ proto.SyncMaterialsToAccurateItemResult.toObject = function(includeInstance, msg) {
4961
+ var f, obj = {
4962
+ materialReferencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
4963
+ materialCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
4964
+ accurateId: jspb.Message.getFieldWithDefault(msg, 3, ""),
4965
+ error: jspb.Message.getFieldWithDefault(msg, 4, "")
4966
+ };
4967
+
4968
+ if (includeInstance) {
4969
+ obj.$jspbMessageInstance = msg;
4970
+ }
4971
+ return obj;
4972
+ };
4973
+ }
4974
+
4975
+
4976
+ /**
4977
+ * Deserializes binary data (in protobuf wire format).
4978
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4979
+ * @return {!proto.SyncMaterialsToAccurateItemResult}
4980
+ */
4981
+ proto.SyncMaterialsToAccurateItemResult.deserializeBinary = function(bytes) {
4982
+ var reader = new jspb.BinaryReader(bytes);
4983
+ var msg = new proto.SyncMaterialsToAccurateItemResult;
4984
+ return proto.SyncMaterialsToAccurateItemResult.deserializeBinaryFromReader(msg, reader);
4985
+ };
4986
+
4987
+
4988
+ /**
4989
+ * Deserializes binary data (in protobuf wire format) from the
4990
+ * given reader into the given message object.
4991
+ * @param {!proto.SyncMaterialsToAccurateItemResult} msg The message object to deserialize into.
4992
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4993
+ * @return {!proto.SyncMaterialsToAccurateItemResult}
4994
+ */
4995
+ proto.SyncMaterialsToAccurateItemResult.deserializeBinaryFromReader = function(msg, reader) {
4996
+ while (reader.nextField()) {
4997
+ if (reader.isEndGroup()) {
4998
+ break;
4999
+ }
5000
+ var field = reader.getFieldNumber();
5001
+ switch (field) {
5002
+ case 1:
5003
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
5004
+ msg.setMaterialReferencesId(value);
5005
+ break;
5006
+ case 2:
5007
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
5008
+ msg.setMaterialCode(value);
5009
+ break;
5010
+ case 3:
5011
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
5012
+ msg.setAccurateId(value);
5013
+ break;
5014
+ case 4:
5015
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
5016
+ msg.setError(value);
5017
+ break;
5018
+ default:
5019
+ reader.skipField();
5020
+ break;
5021
+ }
5022
+ }
5023
+ return msg;
5024
+ };
5025
+
5026
+
5027
+ /**
5028
+ * Serializes the message to binary data (in protobuf wire format).
5029
+ * @return {!Uint8Array}
5030
+ */
5031
+ proto.SyncMaterialsToAccurateItemResult.prototype.serializeBinary = function() {
5032
+ var writer = new jspb.BinaryWriter();
5033
+ proto.SyncMaterialsToAccurateItemResult.serializeBinaryToWriter(this, writer);
5034
+ return writer.getResultBuffer();
5035
+ };
5036
+
5037
+
5038
+ /**
5039
+ * Serializes the given message to binary data (in protobuf wire
5040
+ * format), writing to the given BinaryWriter.
5041
+ * @param {!proto.SyncMaterialsToAccurateItemResult} message
5042
+ * @param {!jspb.BinaryWriter} writer
5043
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5044
+ */
5045
+ proto.SyncMaterialsToAccurateItemResult.serializeBinaryToWriter = function(message, writer) {
5046
+ var f = undefined;
5047
+ f = message.getMaterialReferencesId();
5048
+ if (f.length > 0) {
5049
+ writer.writeString(
5050
+ 1,
5051
+ f
5052
+ );
5053
+ }
5054
+ f = message.getMaterialCode();
5055
+ if (f.length > 0) {
5056
+ writer.writeString(
5057
+ 2,
5058
+ f
5059
+ );
5060
+ }
5061
+ f = message.getAccurateId();
5062
+ if (f.length > 0) {
5063
+ writer.writeString(
5064
+ 3,
5065
+ f
5066
+ );
5067
+ }
5068
+ f = message.getError();
5069
+ if (f.length > 0) {
5070
+ writer.writeString(
5071
+ 4,
5072
+ f
5073
+ );
5074
+ }
5075
+ };
5076
+
5077
+
5078
+ /**
5079
+ * optional string material_references_id = 1;
5080
+ * @return {string}
5081
+ */
5082
+ proto.SyncMaterialsToAccurateItemResult.prototype.getMaterialReferencesId = function() {
5083
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
5084
+ };
5085
+
5086
+
5087
+ /**
5088
+ * @param {string} value
5089
+ * @return {!proto.SyncMaterialsToAccurateItemResult} returns this
5090
+ */
5091
+ proto.SyncMaterialsToAccurateItemResult.prototype.setMaterialReferencesId = function(value) {
5092
+ return jspb.Message.setProto3StringField(this, 1, value);
5093
+ };
5094
+
5095
+
5096
+ /**
5097
+ * optional string material_code = 2;
5098
+ * @return {string}
5099
+ */
5100
+ proto.SyncMaterialsToAccurateItemResult.prototype.getMaterialCode = function() {
5101
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
5102
+ };
5103
+
5104
+
5105
+ /**
5106
+ * @param {string} value
5107
+ * @return {!proto.SyncMaterialsToAccurateItemResult} returns this
5108
+ */
5109
+ proto.SyncMaterialsToAccurateItemResult.prototype.setMaterialCode = function(value) {
5110
+ return jspb.Message.setProto3StringField(this, 2, value);
5111
+ };
5112
+
5113
+
5114
+ /**
5115
+ * optional string accurate_id = 3;
5116
+ * @return {string}
5117
+ */
5118
+ proto.SyncMaterialsToAccurateItemResult.prototype.getAccurateId = function() {
5119
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
5120
+ };
5121
+
5122
+
5123
+ /**
5124
+ * @param {string} value
5125
+ * @return {!proto.SyncMaterialsToAccurateItemResult} returns this
5126
+ */
5127
+ proto.SyncMaterialsToAccurateItemResult.prototype.setAccurateId = function(value) {
5128
+ return jspb.Message.setProto3StringField(this, 3, value);
5129
+ };
5130
+
5131
+
5132
+ /**
5133
+ * optional string error = 4;
5134
+ * @return {string}
5135
+ */
5136
+ proto.SyncMaterialsToAccurateItemResult.prototype.getError = function() {
5137
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
5138
+ };
5139
+
5140
+
5141
+ /**
5142
+ * @param {string} value
5143
+ * @return {!proto.SyncMaterialsToAccurateItemResult} returns this
5144
+ */
5145
+ proto.SyncMaterialsToAccurateItemResult.prototype.setError = function(value) {
5146
+ return jspb.Message.setProto3StringField(this, 4, value);
5147
+ };
5148
+
5149
+
5150
+
5151
+ /**
5152
+ * List of repeated fields within this message type.
5153
+ * @private {!Array<number>}
5154
+ * @const
5155
+ */
5156
+ proto.SyncMaterialsToAccurateResponse.repeatedFields_ = [5];
5157
+
5158
+
5159
+
5160
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5161
+ /**
5162
+ * Creates an object representation of this proto.
5163
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5164
+ * Optional fields that are not set will be set to undefined.
5165
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5166
+ * For the list of reserved names please see:
5167
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5168
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5169
+ * JSPB instance for transitional soy proto support:
5170
+ * http://goto/soy-param-migration
5171
+ * @return {!Object}
5172
+ */
5173
+ proto.SyncMaterialsToAccurateResponse.prototype.toObject = function(opt_includeInstance) {
5174
+ return proto.SyncMaterialsToAccurateResponse.toObject(opt_includeInstance, this);
5175
+ };
5176
+
5177
+
5178
+ /**
5179
+ * Static version of the {@see toObject} method.
5180
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5181
+ * the JSPB instance for transitional soy proto support:
5182
+ * http://goto/soy-param-migration
5183
+ * @param {!proto.SyncMaterialsToAccurateResponse} msg The msg instance to transform.
5184
+ * @return {!Object}
5185
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5186
+ */
5187
+ proto.SyncMaterialsToAccurateResponse.toObject = function(includeInstance, msg) {
5188
+ var f, obj = {
5189
+ total: jspb.Message.getFieldWithDefault(msg, 1, 0),
5190
+ success: jspb.Message.getFieldWithDefault(msg, 2, 0),
5191
+ failed: jspb.Message.getFieldWithDefault(msg, 3, 0),
5192
+ dryRunPayload: jspb.Message.getFieldWithDefault(msg, 4, ""),
5193
+ resultsList: jspb.Message.toObjectList(msg.getResultsList(),
5194
+ proto.SyncMaterialsToAccurateItemResult.toObject, includeInstance)
5195
+ };
5196
+
5197
+ if (includeInstance) {
5198
+ obj.$jspbMessageInstance = msg;
5199
+ }
5200
+ return obj;
5201
+ };
5202
+ }
5203
+
5204
+
5205
+ /**
5206
+ * Deserializes binary data (in protobuf wire format).
5207
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5208
+ * @return {!proto.SyncMaterialsToAccurateResponse}
5209
+ */
5210
+ proto.SyncMaterialsToAccurateResponse.deserializeBinary = function(bytes) {
5211
+ var reader = new jspb.BinaryReader(bytes);
5212
+ var msg = new proto.SyncMaterialsToAccurateResponse;
5213
+ return proto.SyncMaterialsToAccurateResponse.deserializeBinaryFromReader(msg, reader);
5214
+ };
5215
+
5216
+
5217
+ /**
5218
+ * Deserializes binary data (in protobuf wire format) from the
5219
+ * given reader into the given message object.
5220
+ * @param {!proto.SyncMaterialsToAccurateResponse} msg The message object to deserialize into.
5221
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5222
+ * @return {!proto.SyncMaterialsToAccurateResponse}
5223
+ */
5224
+ proto.SyncMaterialsToAccurateResponse.deserializeBinaryFromReader = function(msg, reader) {
5225
+ while (reader.nextField()) {
5226
+ if (reader.isEndGroup()) {
5227
+ break;
5228
+ }
5229
+ var field = reader.getFieldNumber();
5230
+ switch (field) {
5231
+ case 1:
5232
+ var value = /** @type {number} */ (reader.readInt32());
5233
+ msg.setTotal(value);
5234
+ break;
5235
+ case 2:
5236
+ var value = /** @type {number} */ (reader.readInt32());
5237
+ msg.setSuccess(value);
5238
+ break;
5239
+ case 3:
5240
+ var value = /** @type {number} */ (reader.readInt32());
5241
+ msg.setFailed(value);
5242
+ break;
5243
+ case 4:
5244
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
5245
+ msg.setDryRunPayload(value);
5246
+ break;
5247
+ case 5:
5248
+ var value = new proto.SyncMaterialsToAccurateItemResult;
5249
+ reader.readMessage(value,proto.SyncMaterialsToAccurateItemResult.deserializeBinaryFromReader);
5250
+ msg.addResults(value);
5251
+ break;
5252
+ default:
5253
+ reader.skipField();
5254
+ break;
5255
+ }
5256
+ }
5257
+ return msg;
5258
+ };
5259
+
5260
+
5261
+ /**
5262
+ * Serializes the message to binary data (in protobuf wire format).
5263
+ * @return {!Uint8Array}
5264
+ */
5265
+ proto.SyncMaterialsToAccurateResponse.prototype.serializeBinary = function() {
5266
+ var writer = new jspb.BinaryWriter();
5267
+ proto.SyncMaterialsToAccurateResponse.serializeBinaryToWriter(this, writer);
5268
+ return writer.getResultBuffer();
5269
+ };
5270
+
5271
+
5272
+ /**
5273
+ * Serializes the given message to binary data (in protobuf wire
5274
+ * format), writing to the given BinaryWriter.
5275
+ * @param {!proto.SyncMaterialsToAccurateResponse} message
5276
+ * @param {!jspb.BinaryWriter} writer
5277
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5278
+ */
5279
+ proto.SyncMaterialsToAccurateResponse.serializeBinaryToWriter = function(message, writer) {
5280
+ var f = undefined;
5281
+ f = message.getTotal();
5282
+ if (f !== 0) {
5283
+ writer.writeInt32(
5284
+ 1,
5285
+ f
5286
+ );
5287
+ }
5288
+ f = message.getSuccess();
5289
+ if (f !== 0) {
5290
+ writer.writeInt32(
5291
+ 2,
5292
+ f
5293
+ );
5294
+ }
5295
+ f = message.getFailed();
5296
+ if (f !== 0) {
5297
+ writer.writeInt32(
5298
+ 3,
5299
+ f
5300
+ );
5301
+ }
5302
+ f = message.getDryRunPayload();
5303
+ if (f.length > 0) {
5304
+ writer.writeString(
5305
+ 4,
5306
+ f
5307
+ );
5308
+ }
5309
+ f = message.getResultsList();
5310
+ if (f.length > 0) {
5311
+ writer.writeRepeatedMessage(
5312
+ 5,
5313
+ f,
5314
+ proto.SyncMaterialsToAccurateItemResult.serializeBinaryToWriter
5315
+ );
5316
+ }
5317
+ };
5318
+
5319
+
5320
+ /**
5321
+ * optional int32 total = 1;
5322
+ * @return {number}
5323
+ */
5324
+ proto.SyncMaterialsToAccurateResponse.prototype.getTotal = function() {
5325
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5326
+ };
5327
+
5328
+
5329
+ /**
5330
+ * @param {number} value
5331
+ * @return {!proto.SyncMaterialsToAccurateResponse} returns this
5332
+ */
5333
+ proto.SyncMaterialsToAccurateResponse.prototype.setTotal = function(value) {
5334
+ return jspb.Message.setProto3IntField(this, 1, value);
5335
+ };
5336
+
5337
+
5338
+ /**
5339
+ * optional int32 success = 2;
5340
+ * @return {number}
5341
+ */
5342
+ proto.SyncMaterialsToAccurateResponse.prototype.getSuccess = function() {
5343
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
5344
+ };
5345
+
5346
+
5347
+ /**
5348
+ * @param {number} value
5349
+ * @return {!proto.SyncMaterialsToAccurateResponse} returns this
5350
+ */
5351
+ proto.SyncMaterialsToAccurateResponse.prototype.setSuccess = function(value) {
5352
+ return jspb.Message.setProto3IntField(this, 2, value);
5353
+ };
5354
+
5355
+
5356
+ /**
5357
+ * optional int32 failed = 3;
5358
+ * @return {number}
5359
+ */
5360
+ proto.SyncMaterialsToAccurateResponse.prototype.getFailed = function() {
5361
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
5362
+ };
5363
+
5364
+
5365
+ /**
5366
+ * @param {number} value
5367
+ * @return {!proto.SyncMaterialsToAccurateResponse} returns this
5368
+ */
5369
+ proto.SyncMaterialsToAccurateResponse.prototype.setFailed = function(value) {
5370
+ return jspb.Message.setProto3IntField(this, 3, value);
5371
+ };
5372
+
5373
+
5374
+ /**
5375
+ * optional string dry_run_payload = 4;
5376
+ * @return {string}
5377
+ */
5378
+ proto.SyncMaterialsToAccurateResponse.prototype.getDryRunPayload = function() {
5379
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
5380
+ };
5381
+
5382
+
5383
+ /**
5384
+ * @param {string} value
5385
+ * @return {!proto.SyncMaterialsToAccurateResponse} returns this
5386
+ */
5387
+ proto.SyncMaterialsToAccurateResponse.prototype.setDryRunPayload = function(value) {
5388
+ return jspb.Message.setProto3StringField(this, 4, value);
5389
+ };
5390
+
5391
+
5392
+ /**
5393
+ * repeated SyncMaterialsToAccurateItemResult results = 5;
5394
+ * @return {!Array<!proto.SyncMaterialsToAccurateItemResult>}
5395
+ */
5396
+ proto.SyncMaterialsToAccurateResponse.prototype.getResultsList = function() {
5397
+ return /** @type{!Array<!proto.SyncMaterialsToAccurateItemResult>} */ (
5398
+ jspb.Message.getRepeatedWrapperField(this, proto.SyncMaterialsToAccurateItemResult, 5));
5399
+ };
5400
+
5401
+
5402
+ /**
5403
+ * @param {!Array<!proto.SyncMaterialsToAccurateItemResult>} value
5404
+ * @return {!proto.SyncMaterialsToAccurateResponse} returns this
5405
+ */
5406
+ proto.SyncMaterialsToAccurateResponse.prototype.setResultsList = function(value) {
5407
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
5408
+ };
5409
+
5410
+
5411
+ /**
5412
+ * @param {!proto.SyncMaterialsToAccurateItemResult=} opt_value
5413
+ * @param {number=} opt_index
5414
+ * @return {!proto.SyncMaterialsToAccurateItemResult}
5415
+ */
5416
+ proto.SyncMaterialsToAccurateResponse.prototype.addResults = function(opt_value, opt_index) {
5417
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.SyncMaterialsToAccurateItemResult, opt_index);
5418
+ };
5419
+
5420
+
5421
+ /**
5422
+ * Clears the list making it empty but non-null.
5423
+ * @return {!proto.SyncMaterialsToAccurateResponse} returns this
5424
+ */
5425
+ proto.SyncMaterialsToAccurateResponse.prototype.clearResultsList = function() {
5426
+ return this.setResultsList([]);
5427
+ };
5428
+
5429
+
4644
5430
  goog.object.extend(exports, proto);