@miradorlabs/parallax-web 1.0.6 → 1.0.7

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.
package/dist/index.umd.js CHANGED
@@ -706,22 +706,10 @@
706
706
  goog.object.extend(proto, google_protobuf_timestamp_pb);
707
707
  var proto_common_v1_status_pb = requireStatus_pb();
708
708
  goog.object.extend(proto, proto_common_v1_status_pb);
709
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanErrorRequest', null, global);
710
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanErrorResponse', null, global);
711
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanEventRequest', null, global);
712
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanEventResponse', null, global);
713
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest', null, global);
714
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction', null, global);
715
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase', null, global);
716
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintResponse', null, global);
717
709
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest', null, global);
710
+ goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest.Event', null, global);
711
+ goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint', null, global);
718
712
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceResponse', null, global);
719
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest', null, global);
720
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus', null, global);
721
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode', null, global);
722
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanResponse', null, global);
723
- goog.exportSymbol('proto.gateway.parallax.v1.StartSpanRequest', null, global);
724
- goog.exportSymbol('proto.gateway.parallax.v1.StartSpanResponse', null, global);
725
713
  /**
726
714
  * Generated by JsPbCodeGenerator.
727
715
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -753,226 +741,16 @@
753
741
  * @extends {jspb.Message}
754
742
  * @constructor
755
743
  */
756
- proto.gateway.parallax.v1.CreateTraceResponse = function(opt_data) {
757
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
758
- };
759
- goog.inherits(proto.gateway.parallax.v1.CreateTraceResponse, jspb.Message);
760
- if (goog.DEBUG && !COMPILED) {
761
- /**
762
- * @public
763
- * @override
764
- */
765
- proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
766
- }
767
- /**
768
- * Generated by JsPbCodeGenerator.
769
- * @param {Array=} opt_data Optional initial data array, typically from a
770
- * server response, or constructed directly in Javascript. The array is used
771
- * in place and becomes part of the constructed object. It is not cloned.
772
- * If no data is provided, the constructed object will be empty, but still
773
- * valid.
774
- * @extends {jspb.Message}
775
- * @constructor
776
- */
777
- proto.gateway.parallax.v1.StartSpanRequest = function(opt_data) {
778
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
779
- };
780
- goog.inherits(proto.gateway.parallax.v1.StartSpanRequest, jspb.Message);
781
- if (goog.DEBUG && !COMPILED) {
782
- /**
783
- * @public
784
- * @override
785
- */
786
- proto.gateway.parallax.v1.StartSpanRequest.displayName = 'proto.gateway.parallax.v1.StartSpanRequest';
787
- }
788
- /**
789
- * Generated by JsPbCodeGenerator.
790
- * @param {Array=} opt_data Optional initial data array, typically from a
791
- * server response, or constructed directly in Javascript. The array is used
792
- * in place and becomes part of the constructed object. It is not cloned.
793
- * If no data is provided, the constructed object will be empty, but still
794
- * valid.
795
- * @extends {jspb.Message}
796
- * @constructor
797
- */
798
- proto.gateway.parallax.v1.StartSpanResponse = function(opt_data) {
799
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
800
- };
801
- goog.inherits(proto.gateway.parallax.v1.StartSpanResponse, jspb.Message);
802
- if (goog.DEBUG && !COMPILED) {
803
- /**
804
- * @public
805
- * @override
806
- */
807
- proto.gateway.parallax.v1.StartSpanResponse.displayName = 'proto.gateway.parallax.v1.StartSpanResponse';
808
- }
809
- /**
810
- * Generated by JsPbCodeGenerator.
811
- * @param {Array=} opt_data Optional initial data array, typically from a
812
- * server response, or constructed directly in Javascript. The array is used
813
- * in place and becomes part of the constructed object. It is not cloned.
814
- * If no data is provided, the constructed object will be empty, but still
815
- * valid.
816
- * @extends {jspb.Message}
817
- * @constructor
818
- */
819
- proto.gateway.parallax.v1.FinishSpanRequest = function(opt_data) {
820
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
821
- };
822
- goog.inherits(proto.gateway.parallax.v1.FinishSpanRequest, jspb.Message);
823
- if (goog.DEBUG && !COMPILED) {
824
- /**
825
- * @public
826
- * @override
827
- */
828
- proto.gateway.parallax.v1.FinishSpanRequest.displayName = 'proto.gateway.parallax.v1.FinishSpanRequest';
829
- }
830
- /**
831
- * Generated by JsPbCodeGenerator.
832
- * @param {Array=} opt_data Optional initial data array, typically from a
833
- * server response, or constructed directly in Javascript. The array is used
834
- * in place and becomes part of the constructed object. It is not cloned.
835
- * If no data is provided, the constructed object will be empty, but still
836
- * valid.
837
- * @extends {jspb.Message}
838
- * @constructor
839
- */
840
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus = function(opt_data) {
841
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
842
- };
843
- goog.inherits(proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus, jspb.Message);
844
- if (goog.DEBUG && !COMPILED) {
845
- /**
846
- * @public
847
- * @override
848
- */
849
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.displayName = 'proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus';
850
- }
851
- /**
852
- * Generated by JsPbCodeGenerator.
853
- * @param {Array=} opt_data Optional initial data array, typically from a
854
- * server response, or constructed directly in Javascript. The array is used
855
- * in place and becomes part of the constructed object. It is not cloned.
856
- * If no data is provided, the constructed object will be empty, but still
857
- * valid.
858
- * @extends {jspb.Message}
859
- * @constructor
860
- */
861
- proto.gateway.parallax.v1.FinishSpanResponse = function(opt_data) {
862
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
863
- };
864
- goog.inherits(proto.gateway.parallax.v1.FinishSpanResponse, jspb.Message);
865
- if (goog.DEBUG && !COMPILED) {
866
- /**
867
- * @public
868
- * @override
869
- */
870
- proto.gateway.parallax.v1.FinishSpanResponse.displayName = 'proto.gateway.parallax.v1.FinishSpanResponse';
871
- }
872
- /**
873
- * Generated by JsPbCodeGenerator.
874
- * @param {Array=} opt_data Optional initial data array, typically from a
875
- * server response, or constructed directly in Javascript. The array is used
876
- * in place and becomes part of the constructed object. It is not cloned.
877
- * If no data is provided, the constructed object will be empty, but still
878
- * valid.
879
- * @extends {jspb.Message}
880
- * @constructor
881
- */
882
- proto.gateway.parallax.v1.AddSpanEventRequest = function(opt_data) {
883
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
884
- };
885
- goog.inherits(proto.gateway.parallax.v1.AddSpanEventRequest, jspb.Message);
886
- if (goog.DEBUG && !COMPILED) {
887
- /**
888
- * @public
889
- * @override
890
- */
891
- proto.gateway.parallax.v1.AddSpanEventRequest.displayName = 'proto.gateway.parallax.v1.AddSpanEventRequest';
892
- }
893
- /**
894
- * Generated by JsPbCodeGenerator.
895
- * @param {Array=} opt_data Optional initial data array, typically from a
896
- * server response, or constructed directly in Javascript. The array is used
897
- * in place and becomes part of the constructed object. It is not cloned.
898
- * If no data is provided, the constructed object will be empty, but still
899
- * valid.
900
- * @extends {jspb.Message}
901
- * @constructor
902
- */
903
- proto.gateway.parallax.v1.AddSpanEventResponse = function(opt_data) {
904
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
905
- };
906
- goog.inherits(proto.gateway.parallax.v1.AddSpanEventResponse, jspb.Message);
907
- if (goog.DEBUG && !COMPILED) {
908
- /**
909
- * @public
910
- * @override
911
- */
912
- proto.gateway.parallax.v1.AddSpanEventResponse.displayName = 'proto.gateway.parallax.v1.AddSpanEventResponse';
913
- }
914
- /**
915
- * Generated by JsPbCodeGenerator.
916
- * @param {Array=} opt_data Optional initial data array, typically from a
917
- * server response, or constructed directly in Javascript. The array is used
918
- * in place and becomes part of the constructed object. It is not cloned.
919
- * If no data is provided, the constructed object will be empty, but still
920
- * valid.
921
- * @extends {jspb.Message}
922
- * @constructor
923
- */
924
- proto.gateway.parallax.v1.AddSpanErrorRequest = function(opt_data) {
925
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
926
- };
927
- goog.inherits(proto.gateway.parallax.v1.AddSpanErrorRequest, jspb.Message);
928
- if (goog.DEBUG && !COMPILED) {
929
- /**
930
- * @public
931
- * @override
932
- */
933
- proto.gateway.parallax.v1.AddSpanErrorRequest.displayName = 'proto.gateway.parallax.v1.AddSpanErrorRequest';
934
- }
935
- /**
936
- * Generated by JsPbCodeGenerator.
937
- * @param {Array=} opt_data Optional initial data array, typically from a
938
- * server response, or constructed directly in Javascript. The array is used
939
- * in place and becomes part of the constructed object. It is not cloned.
940
- * If no data is provided, the constructed object will be empty, but still
941
- * valid.
942
- * @extends {jspb.Message}
943
- * @constructor
944
- */
945
- proto.gateway.parallax.v1.AddSpanErrorResponse = function(opt_data) {
744
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint = function(opt_data) {
946
745
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
947
746
  };
948
- goog.inherits(proto.gateway.parallax.v1.AddSpanErrorResponse, jspb.Message);
949
- if (goog.DEBUG && !COMPILED) {
950
- /**
951
- * @public
952
- * @override
953
- */
954
- proto.gateway.parallax.v1.AddSpanErrorResponse.displayName = 'proto.gateway.parallax.v1.AddSpanErrorResponse';
955
- }
956
- /**
957
- * Generated by JsPbCodeGenerator.
958
- * @param {Array=} opt_data Optional initial data array, typically from a
959
- * server response, or constructed directly in Javascript. The array is used
960
- * in place and becomes part of the constructed object. It is not cloned.
961
- * If no data is provided, the constructed object will be empty, but still
962
- * valid.
963
- * @extends {jspb.Message}
964
- * @constructor
965
- */
966
- proto.gateway.parallax.v1.AddSpanHintRequest = function(opt_data) {
967
- jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_);
968
- };
969
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintRequest, jspb.Message);
747
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint, jspb.Message);
970
748
  if (goog.DEBUG && !COMPILED) {
971
749
  /**
972
750
  * @public
973
751
  * @override
974
752
  */
975
- proto.gateway.parallax.v1.AddSpanHintRequest.displayName = 'proto.gateway.parallax.v1.AddSpanHintRequest';
753
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.displayName = 'proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint';
976
754
  }
977
755
  /**
978
756
  * Generated by JsPbCodeGenerator.
@@ -984,16 +762,16 @@
984
762
  * @extends {jspb.Message}
985
763
  * @constructor
986
764
  */
987
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction = function(opt_data) {
765
+ proto.gateway.parallax.v1.CreateTraceRequest.Event = function(opt_data) {
988
766
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
989
767
  };
990
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction, jspb.Message);
768
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest.Event, jspb.Message);
991
769
  if (goog.DEBUG && !COMPILED) {
992
770
  /**
993
771
  * @public
994
772
  * @override
995
773
  */
996
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.displayName = 'proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction';
774
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.displayName = 'proto.gateway.parallax.v1.CreateTraceRequest.Event';
997
775
  }
998
776
  /**
999
777
  * Generated by JsPbCodeGenerator.
@@ -1005,16 +783,16 @@
1005
783
  * @extends {jspb.Message}
1006
784
  * @constructor
1007
785
  */
1008
- proto.gateway.parallax.v1.AddSpanHintResponse = function(opt_data) {
786
+ proto.gateway.parallax.v1.CreateTraceResponse = function(opt_data) {
1009
787
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1010
788
  };
1011
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintResponse, jspb.Message);
789
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceResponse, jspb.Message);
1012
790
  if (goog.DEBUG && !COMPILED) {
1013
791
  /**
1014
792
  * @public
1015
793
  * @override
1016
794
  */
1017
- proto.gateway.parallax.v1.AddSpanHintResponse.displayName = 'proto.gateway.parallax.v1.AddSpanHintResponse';
795
+ proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
1018
796
  }
1019
797
 
1020
798
  /**
@@ -1022,7 +800,7 @@
1022
800
  * @private {!Array<number>}
1023
801
  * @const
1024
802
  */
1025
- proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3];
803
+ proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3,4];
1026
804
 
1027
805
 
1028
806
 
@@ -1058,7 +836,9 @@
1058
836
  name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1059
837
  attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
1060
838
  tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
1061
- startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
839
+ eventsList: jspb.Message.toObjectList(msg.getEventsList(),
840
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject, includeInstance),
841
+ txHashHint: (f = msg.getTxHashHint()) && proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject(includeInstance, f)
1062
842
  };
1063
843
 
1064
844
  if (includeInstance) {
@@ -1110,9 +890,14 @@
1110
890
  msg.addTags(value);
1111
891
  break;
1112
892
  case 4:
1113
- var value = new google_protobuf_timestamp_pb.Timestamp;
1114
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1115
- msg.setStartTime(value);
893
+ var value = new proto.gateway.parallax.v1.CreateTraceRequest.Event;
894
+ reader.readMessage(value,proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader);
895
+ msg.addEvents(value);
896
+ break;
897
+ case 5:
898
+ var value = new proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint;
899
+ reader.readMessage(value,proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader);
900
+ msg.setTxHashHint(value);
1116
901
  break;
1117
902
  default:
1118
903
  reader.skipField();
@@ -1161,1894 +946,91 @@
1161
946
  f
1162
947
  );
1163
948
  }
1164
- f = message.getStartTime();
949
+ f = message.getEventsList();
950
+ if (f.length > 0) {
951
+ writer.writeRepeatedMessage(
952
+ 4,
953
+ f,
954
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter
955
+ );
956
+ }
957
+ f = message.getTxHashHint();
1165
958
  if (f != null) {
1166
959
  writer.writeMessage(
1167
- 4,
960
+ 5,
1168
961
  f,
1169
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
962
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter
1170
963
  );
1171
964
  }
1172
965
  };
1173
966
 
1174
967
 
1175
- /**
1176
- * optional string name = 1;
1177
- * @return {string}
1178
- */
1179
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
1180
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1181
- };
1182
968
 
1183
969
 
970
+
971
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1184
972
  /**
1185
- * @param {string} value
1186
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
973
+ * Creates an object representation of this proto.
974
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
975
+ * Optional fields that are not set will be set to undefined.
976
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
977
+ * For the list of reserved names please see:
978
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
979
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
980
+ * JSPB instance for transitional soy proto support:
981
+ * http://goto/soy-param-migration
982
+ * @return {!Object}
1187
983
  */
1188
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
1189
- return jspb.Message.setProto3StringField(this, 1, value);
984
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.toObject = function(opt_includeInstance) {
985
+ return proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject(opt_includeInstance, this);
1190
986
  };
1191
987
 
1192
988
 
1193
989
  /**
1194
- * map<string, string> attributes = 2;
1195
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1196
- * empty, instead returning `undefined`
1197
- * @return {!jspb.Map<string,string>}
990
+ * Static version of the {@see toObject} method.
991
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
992
+ * the JSPB instance for transitional soy proto support:
993
+ * http://goto/soy-param-migration
994
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} msg The msg instance to transform.
995
+ * @return {!Object}
996
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1198
997
  */
1199
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1200
- return /** @type {!jspb.Map<string,string>} */ (
1201
- jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1202
- null));
998
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject = function(includeInstance, msg) {
999
+ var f, obj = {
1000
+ chainId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1001
+ txHash: jspb.Message.getFieldWithDefault(msg, 2, ""),
1002
+ details: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1003
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1004
+ };
1005
+
1006
+ if (includeInstance) {
1007
+ obj.$jspbMessageInstance = msg;
1008
+ }
1009
+ return obj;
1203
1010
  };
1011
+ }
1204
1012
 
1205
1013
 
1206
1014
  /**
1207
- * Clears values from the map. The map will be non-null.
1208
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1015
+ * Deserializes binary data (in protobuf wire format).
1016
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1017
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
1209
1018
  */
1210
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1211
- this.getAttributesMap().clear();
1212
- return this;
1019
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinary = function(bytes) {
1020
+ var reader = new jspb.BinaryReader(bytes);
1021
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint;
1022
+ return proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader(msg, reader);
1213
1023
  };
1214
1024
 
1215
1025
 
1216
1026
  /**
1217
- * repeated string tags = 3;
1218
- * @return {!Array<string>}
1027
+ * Deserializes binary data (in protobuf wire format) from the
1028
+ * given reader into the given message object.
1029
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} msg The message object to deserialize into.
1030
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1031
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
1219
1032
  */
1220
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1221
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
1222
- };
1223
-
1224
-
1225
- /**
1226
- * @param {!Array<string>} value
1227
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1228
- */
1229
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1230
- return jspb.Message.setField(this, 3, value || []);
1231
- };
1232
-
1233
-
1234
- /**
1235
- * @param {string} value
1236
- * @param {number=} opt_index
1237
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1238
- */
1239
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1240
- return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
1241
- };
1242
-
1243
-
1244
- /**
1245
- * Clears the list making it empty but non-null.
1246
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1247
- */
1248
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1249
- return this.setTagsList([]);
1250
- };
1251
-
1252
-
1253
- /**
1254
- * optional google.protobuf.Timestamp start_time = 4;
1255
- * @return {?proto.google.protobuf.Timestamp}
1256
- */
1257
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getStartTime = function() {
1258
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1259
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
1260
- };
1261
-
1262
-
1263
- /**
1264
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1265
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1266
- */
1267
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setStartTime = function(value) {
1268
- return jspb.Message.setWrapperField(this, 4, value);
1269
- };
1270
-
1271
-
1272
- /**
1273
- * Clears the message field making it undefined.
1274
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1275
- */
1276
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearStartTime = function() {
1277
- return this.setStartTime(undefined);
1278
- };
1279
-
1280
-
1281
- /**
1282
- * Returns whether this field is set.
1283
- * @return {boolean}
1284
- */
1285
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasStartTime = function() {
1286
- return jspb.Message.getField(this, 4) != null;
1287
- };
1288
-
1289
-
1290
-
1291
-
1292
-
1293
- if (jspb.Message.GENERATE_TO_OBJECT) {
1294
- /**
1295
- * Creates an object representation of this proto.
1296
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1297
- * Optional fields that are not set will be set to undefined.
1298
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1299
- * For the list of reserved names please see:
1300
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1301
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1302
- * JSPB instance for transitional soy proto support:
1303
- * http://goto/soy-param-migration
1304
- * @return {!Object}
1305
- */
1306
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1307
- return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
1308
- };
1309
-
1310
-
1311
- /**
1312
- * Static version of the {@see toObject} method.
1313
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1314
- * the JSPB instance for transitional soy proto support:
1315
- * http://goto/soy-param-migration
1316
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
1317
- * @return {!Object}
1318
- * @suppress {unusedLocalVariables} f is only used for nested messages
1319
- */
1320
- proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
1321
- var f, obj = {
1322
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1323
- traceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1324
- rootSpanId: jspb.Message.getFieldWithDefault(msg, 3, "")
1325
- };
1326
-
1327
- if (includeInstance) {
1328
- obj.$jspbMessageInstance = msg;
1329
- }
1330
- return obj;
1331
- };
1332
- }
1333
-
1334
-
1335
- /**
1336
- * Deserializes binary data (in protobuf wire format).
1337
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1338
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1339
- */
1340
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
1341
- var reader = new jspb.BinaryReader(bytes);
1342
- var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1343
- return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
1344
- };
1345
-
1346
-
1347
- /**
1348
- * Deserializes binary data (in protobuf wire format) from the
1349
- * given reader into the given message object.
1350
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
1351
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1352
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1353
- */
1354
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
1355
- while (reader.nextField()) {
1356
- if (reader.isEndGroup()) {
1357
- break;
1358
- }
1359
- var field = reader.getFieldNumber();
1360
- switch (field) {
1361
- case 1:
1362
- var value = new proto_common_v1_status_pb.ResponseStatus;
1363
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1364
- msg.setStatus(value);
1365
- break;
1366
- case 2:
1367
- var value = /** @type {string} */ (reader.readString());
1368
- msg.setTraceId(value);
1369
- break;
1370
- case 3:
1371
- var value = /** @type {string} */ (reader.readString());
1372
- msg.setRootSpanId(value);
1373
- break;
1374
- default:
1375
- reader.skipField();
1376
- break;
1377
- }
1378
- }
1379
- return msg;
1380
- };
1381
-
1382
-
1383
- /**
1384
- * Serializes the message to binary data (in protobuf wire format).
1385
- * @return {!Uint8Array}
1386
- */
1387
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
1388
- var writer = new jspb.BinaryWriter();
1389
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
1390
- return writer.getResultBuffer();
1391
- };
1392
-
1393
-
1394
- /**
1395
- * Serializes the given message to binary data (in protobuf wire
1396
- * format), writing to the given BinaryWriter.
1397
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
1398
- * @param {!jspb.BinaryWriter} writer
1399
- * @suppress {unusedLocalVariables} f is only used for nested messages
1400
- */
1401
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
1402
- var f = undefined;
1403
- f = message.getStatus();
1404
- if (f != null) {
1405
- writer.writeMessage(
1406
- 1,
1407
- f,
1408
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1409
- );
1410
- }
1411
- f = message.getTraceId();
1412
- if (f.length > 0) {
1413
- writer.writeString(
1414
- 2,
1415
- f
1416
- );
1417
- }
1418
- f = message.getRootSpanId();
1419
- if (f.length > 0) {
1420
- writer.writeString(
1421
- 3,
1422
- f
1423
- );
1424
- }
1425
- };
1426
-
1427
-
1428
- /**
1429
- * optional common.v1.ResponseStatus status = 1;
1430
- * @return {?proto.common.v1.ResponseStatus}
1431
- */
1432
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getStatus = function() {
1433
- return /** @type{?proto.common.v1.ResponseStatus} */ (
1434
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1435
- };
1436
-
1437
-
1438
- /**
1439
- * @param {?proto.common.v1.ResponseStatus|undefined} value
1440
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1441
- */
1442
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setStatus = function(value) {
1443
- return jspb.Message.setWrapperField(this, 1, value);
1444
- };
1445
-
1446
-
1447
- /**
1448
- * Clears the message field making it undefined.
1449
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1450
- */
1451
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.clearStatus = function() {
1452
- return this.setStatus(undefined);
1453
- };
1454
-
1455
-
1456
- /**
1457
- * Returns whether this field is set.
1458
- * @return {boolean}
1459
- */
1460
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.hasStatus = function() {
1461
- return jspb.Message.getField(this, 1) != null;
1462
- };
1463
-
1464
-
1465
- /**
1466
- * optional string trace_id = 2;
1467
- * @return {string}
1468
- */
1469
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getTraceId = function() {
1470
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1471
- };
1472
-
1473
-
1474
- /**
1475
- * @param {string} value
1476
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1477
- */
1478
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setTraceId = function(value) {
1479
- return jspb.Message.setProto3StringField(this, 2, value);
1480
- };
1481
-
1482
-
1483
- /**
1484
- * optional string root_span_id = 3;
1485
- * @return {string}
1486
- */
1487
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getRootSpanId = function() {
1488
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1489
- };
1490
-
1491
-
1492
- /**
1493
- * @param {string} value
1494
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1495
- */
1496
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setRootSpanId = function(value) {
1497
- return jspb.Message.setProto3StringField(this, 3, value);
1498
- };
1499
-
1500
-
1501
-
1502
-
1503
-
1504
- if (jspb.Message.GENERATE_TO_OBJECT) {
1505
- /**
1506
- * Creates an object representation of this proto.
1507
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1508
- * Optional fields that are not set will be set to undefined.
1509
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1510
- * For the list of reserved names please see:
1511
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1512
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1513
- * JSPB instance for transitional soy proto support:
1514
- * http://goto/soy-param-migration
1515
- * @return {!Object}
1516
- */
1517
- proto.gateway.parallax.v1.StartSpanRequest.prototype.toObject = function(opt_includeInstance) {
1518
- return proto.gateway.parallax.v1.StartSpanRequest.toObject(opt_includeInstance, this);
1519
- };
1520
-
1521
-
1522
- /**
1523
- * Static version of the {@see toObject} method.
1524
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1525
- * the JSPB instance for transitional soy proto support:
1526
- * http://goto/soy-param-migration
1527
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} msg The msg instance to transform.
1528
- * @return {!Object}
1529
- * @suppress {unusedLocalVariables} f is only used for nested messages
1530
- */
1531
- proto.gateway.parallax.v1.StartSpanRequest.toObject = function(includeInstance, msg) {
1532
- var f, obj = {
1533
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1534
- traceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1535
- parentSpanId: jspb.Message.getFieldWithDefault(msg, 3, ""),
1536
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
1537
- startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1538
- };
1539
-
1540
- if (includeInstance) {
1541
- obj.$jspbMessageInstance = msg;
1542
- }
1543
- return obj;
1544
- };
1545
- }
1546
-
1547
-
1548
- /**
1549
- * Deserializes binary data (in protobuf wire format).
1550
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1551
- * @return {!proto.gateway.parallax.v1.StartSpanRequest}
1552
- */
1553
- proto.gateway.parallax.v1.StartSpanRequest.deserializeBinary = function(bytes) {
1554
- var reader = new jspb.BinaryReader(bytes);
1555
- var msg = new proto.gateway.parallax.v1.StartSpanRequest;
1556
- return proto.gateway.parallax.v1.StartSpanRequest.deserializeBinaryFromReader(msg, reader);
1557
- };
1558
-
1559
-
1560
- /**
1561
- * Deserializes binary data (in protobuf wire format) from the
1562
- * given reader into the given message object.
1563
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} msg The message object to deserialize into.
1564
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1565
- * @return {!proto.gateway.parallax.v1.StartSpanRequest}
1566
- */
1567
- proto.gateway.parallax.v1.StartSpanRequest.deserializeBinaryFromReader = function(msg, reader) {
1568
- while (reader.nextField()) {
1569
- if (reader.isEndGroup()) {
1570
- break;
1571
- }
1572
- var field = reader.getFieldNumber();
1573
- switch (field) {
1574
- case 1:
1575
- var value = /** @type {string} */ (reader.readString());
1576
- msg.setName(value);
1577
- break;
1578
- case 2:
1579
- var value = /** @type {string} */ (reader.readString());
1580
- msg.setTraceId(value);
1581
- break;
1582
- case 3:
1583
- var value = /** @type {string} */ (reader.readString());
1584
- msg.setParentSpanId(value);
1585
- break;
1586
- case 4:
1587
- var value = msg.getAttributesMap();
1588
- reader.readMessage(value, function(message, reader) {
1589
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
1590
- });
1591
- break;
1592
- case 5:
1593
- var value = new google_protobuf_timestamp_pb.Timestamp;
1594
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1595
- msg.setStartTime(value);
1596
- break;
1597
- default:
1598
- reader.skipField();
1599
- break;
1600
- }
1601
- }
1602
- return msg;
1603
- };
1604
-
1605
-
1606
- /**
1607
- * Serializes the message to binary data (in protobuf wire format).
1608
- * @return {!Uint8Array}
1609
- */
1610
- proto.gateway.parallax.v1.StartSpanRequest.prototype.serializeBinary = function() {
1611
- var writer = new jspb.BinaryWriter();
1612
- proto.gateway.parallax.v1.StartSpanRequest.serializeBinaryToWriter(this, writer);
1613
- return writer.getResultBuffer();
1614
- };
1615
-
1616
-
1617
- /**
1618
- * Serializes the given message to binary data (in protobuf wire
1619
- * format), writing to the given BinaryWriter.
1620
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} message
1621
- * @param {!jspb.BinaryWriter} writer
1622
- * @suppress {unusedLocalVariables} f is only used for nested messages
1623
- */
1624
- proto.gateway.parallax.v1.StartSpanRequest.serializeBinaryToWriter = function(message, writer) {
1625
- var f = undefined;
1626
- f = message.getName();
1627
- if (f.length > 0) {
1628
- writer.writeString(
1629
- 1,
1630
- f
1631
- );
1632
- }
1633
- f = message.getTraceId();
1634
- if (f.length > 0) {
1635
- writer.writeString(
1636
- 2,
1637
- f
1638
- );
1639
- }
1640
- f = message.getParentSpanId();
1641
- if (f.length > 0) {
1642
- writer.writeString(
1643
- 3,
1644
- f
1645
- );
1646
- }
1647
- f = message.getAttributesMap(true);
1648
- if (f && f.getLength() > 0) {
1649
- f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
1650
- }
1651
- f = message.getStartTime();
1652
- if (f != null) {
1653
- writer.writeMessage(
1654
- 5,
1655
- f,
1656
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1657
- );
1658
- }
1659
- };
1660
-
1661
-
1662
- /**
1663
- * optional string name = 1;
1664
- * @return {string}
1665
- */
1666
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getName = function() {
1667
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1668
- };
1669
-
1670
-
1671
- /**
1672
- * @param {string} value
1673
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1674
- */
1675
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setName = function(value) {
1676
- return jspb.Message.setProto3StringField(this, 1, value);
1677
- };
1678
-
1679
-
1680
- /**
1681
- * optional string trace_id = 2;
1682
- * @return {string}
1683
- */
1684
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getTraceId = function() {
1685
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1686
- };
1687
-
1688
-
1689
- /**
1690
- * @param {string} value
1691
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1692
- */
1693
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setTraceId = function(value) {
1694
- return jspb.Message.setProto3StringField(this, 2, value);
1695
- };
1696
-
1697
-
1698
- /**
1699
- * optional string parent_span_id = 3;
1700
- * @return {string}
1701
- */
1702
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getParentSpanId = function() {
1703
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1704
- };
1705
-
1706
-
1707
- /**
1708
- * @param {string} value
1709
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1710
- */
1711
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setParentSpanId = function(value) {
1712
- return jspb.Message.setProto3StringField(this, 3, value);
1713
- };
1714
-
1715
-
1716
- /**
1717
- * map<string, string> attributes = 4;
1718
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1719
- * empty, instead returning `undefined`
1720
- * @return {!jspb.Map<string,string>}
1721
- */
1722
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1723
- return /** @type {!jspb.Map<string,string>} */ (
1724
- jspb.Message.getMapField(this, 4, opt_noLazyCreate,
1725
- null));
1726
- };
1727
-
1728
-
1729
- /**
1730
- * Clears values from the map. The map will be non-null.
1731
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1732
- */
1733
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearAttributesMap = function() {
1734
- this.getAttributesMap().clear();
1735
- return this;
1736
- };
1737
-
1738
-
1739
- /**
1740
- * optional google.protobuf.Timestamp start_time = 5;
1741
- * @return {?proto.google.protobuf.Timestamp}
1742
- */
1743
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getStartTime = function() {
1744
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1745
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1746
- };
1747
-
1748
-
1749
- /**
1750
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1751
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1752
- */
1753
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setStartTime = function(value) {
1754
- return jspb.Message.setWrapperField(this, 5, value);
1755
- };
1756
-
1757
-
1758
- /**
1759
- * Clears the message field making it undefined.
1760
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1761
- */
1762
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearStartTime = function() {
1763
- return this.setStartTime(undefined);
1764
- };
1765
-
1766
-
1767
- /**
1768
- * Returns whether this field is set.
1769
- * @return {boolean}
1770
- */
1771
- proto.gateway.parallax.v1.StartSpanRequest.prototype.hasStartTime = function() {
1772
- return jspb.Message.getField(this, 5) != null;
1773
- };
1774
-
1775
-
1776
-
1777
-
1778
-
1779
- if (jspb.Message.GENERATE_TO_OBJECT) {
1780
- /**
1781
- * Creates an object representation of this proto.
1782
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1783
- * Optional fields that are not set will be set to undefined.
1784
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1785
- * For the list of reserved names please see:
1786
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1787
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1788
- * JSPB instance for transitional soy proto support:
1789
- * http://goto/soy-param-migration
1790
- * @return {!Object}
1791
- */
1792
- proto.gateway.parallax.v1.StartSpanResponse.prototype.toObject = function(opt_includeInstance) {
1793
- return proto.gateway.parallax.v1.StartSpanResponse.toObject(opt_includeInstance, this);
1794
- };
1795
-
1796
-
1797
- /**
1798
- * Static version of the {@see toObject} method.
1799
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1800
- * the JSPB instance for transitional soy proto support:
1801
- * http://goto/soy-param-migration
1802
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} msg The msg instance to transform.
1803
- * @return {!Object}
1804
- * @suppress {unusedLocalVariables} f is only used for nested messages
1805
- */
1806
- proto.gateway.parallax.v1.StartSpanResponse.toObject = function(includeInstance, msg) {
1807
- var f, obj = {
1808
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1809
- spanId: jspb.Message.getFieldWithDefault(msg, 2, "")
1810
- };
1811
-
1812
- if (includeInstance) {
1813
- obj.$jspbMessageInstance = msg;
1814
- }
1815
- return obj;
1816
- };
1817
- }
1818
-
1819
-
1820
- /**
1821
- * Deserializes binary data (in protobuf wire format).
1822
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1823
- * @return {!proto.gateway.parallax.v1.StartSpanResponse}
1824
- */
1825
- proto.gateway.parallax.v1.StartSpanResponse.deserializeBinary = function(bytes) {
1826
- var reader = new jspb.BinaryReader(bytes);
1827
- var msg = new proto.gateway.parallax.v1.StartSpanResponse;
1828
- return proto.gateway.parallax.v1.StartSpanResponse.deserializeBinaryFromReader(msg, reader);
1829
- };
1830
-
1831
-
1832
- /**
1833
- * Deserializes binary data (in protobuf wire format) from the
1834
- * given reader into the given message object.
1835
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} msg The message object to deserialize into.
1836
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1837
- * @return {!proto.gateway.parallax.v1.StartSpanResponse}
1838
- */
1839
- proto.gateway.parallax.v1.StartSpanResponse.deserializeBinaryFromReader = function(msg, reader) {
1840
- while (reader.nextField()) {
1841
- if (reader.isEndGroup()) {
1842
- break;
1843
- }
1844
- var field = reader.getFieldNumber();
1845
- switch (field) {
1846
- case 1:
1847
- var value = new proto_common_v1_status_pb.ResponseStatus;
1848
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1849
- msg.setStatus(value);
1850
- break;
1851
- case 2:
1852
- var value = /** @type {string} */ (reader.readString());
1853
- msg.setSpanId(value);
1854
- break;
1855
- default:
1856
- reader.skipField();
1857
- break;
1858
- }
1859
- }
1860
- return msg;
1861
- };
1862
-
1863
-
1864
- /**
1865
- * Serializes the message to binary data (in protobuf wire format).
1866
- * @return {!Uint8Array}
1867
- */
1868
- proto.gateway.parallax.v1.StartSpanResponse.prototype.serializeBinary = function() {
1869
- var writer = new jspb.BinaryWriter();
1870
- proto.gateway.parallax.v1.StartSpanResponse.serializeBinaryToWriter(this, writer);
1871
- return writer.getResultBuffer();
1872
- };
1873
-
1874
-
1875
- /**
1876
- * Serializes the given message to binary data (in protobuf wire
1877
- * format), writing to the given BinaryWriter.
1878
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} message
1879
- * @param {!jspb.BinaryWriter} writer
1880
- * @suppress {unusedLocalVariables} f is only used for nested messages
1881
- */
1882
- proto.gateway.parallax.v1.StartSpanResponse.serializeBinaryToWriter = function(message, writer) {
1883
- var f = undefined;
1884
- f = message.getStatus();
1885
- if (f != null) {
1886
- writer.writeMessage(
1887
- 1,
1888
- f,
1889
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1890
- );
1891
- }
1892
- f = message.getSpanId();
1893
- if (f.length > 0) {
1894
- writer.writeString(
1895
- 2,
1896
- f
1897
- );
1898
- }
1899
- };
1900
-
1901
-
1902
- /**
1903
- * optional common.v1.ResponseStatus status = 1;
1904
- * @return {?proto.common.v1.ResponseStatus}
1905
- */
1906
- proto.gateway.parallax.v1.StartSpanResponse.prototype.getStatus = function() {
1907
- return /** @type{?proto.common.v1.ResponseStatus} */ (
1908
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1909
- };
1910
-
1911
-
1912
- /**
1913
- * @param {?proto.common.v1.ResponseStatus|undefined} value
1914
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1915
- */
1916
- proto.gateway.parallax.v1.StartSpanResponse.prototype.setStatus = function(value) {
1917
- return jspb.Message.setWrapperField(this, 1, value);
1918
- };
1919
-
1920
-
1921
- /**
1922
- * Clears the message field making it undefined.
1923
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1924
- */
1925
- proto.gateway.parallax.v1.StartSpanResponse.prototype.clearStatus = function() {
1926
- return this.setStatus(undefined);
1927
- };
1928
-
1929
-
1930
- /**
1931
- * Returns whether this field is set.
1932
- * @return {boolean}
1933
- */
1934
- proto.gateway.parallax.v1.StartSpanResponse.prototype.hasStatus = function() {
1935
- return jspb.Message.getField(this, 1) != null;
1936
- };
1937
-
1938
-
1939
- /**
1940
- * optional string span_id = 2;
1941
- * @return {string}
1942
- */
1943
- proto.gateway.parallax.v1.StartSpanResponse.prototype.getSpanId = function() {
1944
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1945
- };
1946
-
1947
-
1948
- /**
1949
- * @param {string} value
1950
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1951
- */
1952
- proto.gateway.parallax.v1.StartSpanResponse.prototype.setSpanId = function(value) {
1953
- return jspb.Message.setProto3StringField(this, 2, value);
1954
- };
1955
-
1956
-
1957
-
1958
-
1959
-
1960
- if (jspb.Message.GENERATE_TO_OBJECT) {
1961
- /**
1962
- * Creates an object representation of this proto.
1963
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1964
- * Optional fields that are not set will be set to undefined.
1965
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1966
- * For the list of reserved names please see:
1967
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1968
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1969
- * JSPB instance for transitional soy proto support:
1970
- * http://goto/soy-param-migration
1971
- * @return {!Object}
1972
- */
1973
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.toObject = function(opt_includeInstance) {
1974
- return proto.gateway.parallax.v1.FinishSpanRequest.toObject(opt_includeInstance, this);
1975
- };
1976
-
1977
-
1978
- /**
1979
- * Static version of the {@see toObject} method.
1980
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1981
- * the JSPB instance for transitional soy proto support:
1982
- * http://goto/soy-param-migration
1983
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} msg The msg instance to transform.
1984
- * @return {!Object}
1985
- * @suppress {unusedLocalVariables} f is only used for nested messages
1986
- */
1987
- proto.gateway.parallax.v1.FinishSpanRequest.toObject = function(includeInstance, msg) {
1988
- var f, obj = {
1989
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1990
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1991
- endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1992
- status: (f = msg.getStatus()) && proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject(includeInstance, f)
1993
- };
1994
-
1995
- if (includeInstance) {
1996
- obj.$jspbMessageInstance = msg;
1997
- }
1998
- return obj;
1999
- };
2000
- }
2001
-
2002
-
2003
- /**
2004
- * Deserializes binary data (in protobuf wire format).
2005
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2006
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest}
2007
- */
2008
- proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinary = function(bytes) {
2009
- var reader = new jspb.BinaryReader(bytes);
2010
- var msg = new proto.gateway.parallax.v1.FinishSpanRequest;
2011
- return proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinaryFromReader(msg, reader);
2012
- };
2013
-
2014
-
2015
- /**
2016
- * Deserializes binary data (in protobuf wire format) from the
2017
- * given reader into the given message object.
2018
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} msg The message object to deserialize into.
2019
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2020
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest}
2021
- */
2022
- proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinaryFromReader = function(msg, reader) {
2023
- while (reader.nextField()) {
2024
- if (reader.isEndGroup()) {
2025
- break;
2026
- }
2027
- var field = reader.getFieldNumber();
2028
- switch (field) {
2029
- case 1:
2030
- var value = /** @type {string} */ (reader.readString());
2031
- msg.setTraceId(value);
2032
- break;
2033
- case 2:
2034
- var value = /** @type {string} */ (reader.readString());
2035
- msg.setSpanId(value);
2036
- break;
2037
- case 3:
2038
- var value = new google_protobuf_timestamp_pb.Timestamp;
2039
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2040
- msg.setEndTime(value);
2041
- break;
2042
- case 4:
2043
- var value = new proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus;
2044
- reader.readMessage(value,proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader);
2045
- msg.setStatus(value);
2046
- break;
2047
- default:
2048
- reader.skipField();
2049
- break;
2050
- }
2051
- }
2052
- return msg;
2053
- };
2054
-
2055
-
2056
- /**
2057
- * Serializes the message to binary data (in protobuf wire format).
2058
- * @return {!Uint8Array}
2059
- */
2060
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.serializeBinary = function() {
2061
- var writer = new jspb.BinaryWriter();
2062
- proto.gateway.parallax.v1.FinishSpanRequest.serializeBinaryToWriter(this, writer);
2063
- return writer.getResultBuffer();
2064
- };
2065
-
2066
-
2067
- /**
2068
- * Serializes the given message to binary data (in protobuf wire
2069
- * format), writing to the given BinaryWriter.
2070
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} message
2071
- * @param {!jspb.BinaryWriter} writer
2072
- * @suppress {unusedLocalVariables} f is only used for nested messages
2073
- */
2074
- proto.gateway.parallax.v1.FinishSpanRequest.serializeBinaryToWriter = function(message, writer) {
2075
- var f = undefined;
2076
- f = message.getTraceId();
2077
- if (f.length > 0) {
2078
- writer.writeString(
2079
- 1,
2080
- f
2081
- );
2082
- }
2083
- f = message.getSpanId();
2084
- if (f.length > 0) {
2085
- writer.writeString(
2086
- 2,
2087
- f
2088
- );
2089
- }
2090
- f = message.getEndTime();
2091
- if (f != null) {
2092
- writer.writeMessage(
2093
- 3,
2094
- f,
2095
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2096
- );
2097
- }
2098
- f = message.getStatus();
2099
- if (f != null) {
2100
- writer.writeMessage(
2101
- 4,
2102
- f,
2103
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter
2104
- );
2105
- }
2106
- };
2107
-
2108
-
2109
-
2110
-
2111
-
2112
- if (jspb.Message.GENERATE_TO_OBJECT) {
2113
- /**
2114
- * Creates an object representation of this proto.
2115
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2116
- * Optional fields that are not set will be set to undefined.
2117
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2118
- * For the list of reserved names please see:
2119
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2120
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2121
- * JSPB instance for transitional soy proto support:
2122
- * http://goto/soy-param-migration
2123
- * @return {!Object}
2124
- */
2125
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.toObject = function(opt_includeInstance) {
2126
- return proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject(opt_includeInstance, this);
2127
- };
2128
-
2129
-
2130
- /**
2131
- * Static version of the {@see toObject} method.
2132
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2133
- * the JSPB instance for transitional soy proto support:
2134
- * http://goto/soy-param-migration
2135
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} msg The msg instance to transform.
2136
- * @return {!Object}
2137
- * @suppress {unusedLocalVariables} f is only used for nested messages
2138
- */
2139
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject = function(includeInstance, msg) {
2140
- var f, obj = {
2141
- code: jspb.Message.getFieldWithDefault(msg, 1, 0),
2142
- message: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
2143
- };
2144
-
2145
- if (includeInstance) {
2146
- obj.$jspbMessageInstance = msg;
2147
- }
2148
- return obj;
2149
- };
2150
- }
2151
-
2152
-
2153
- /**
2154
- * Deserializes binary data (in protobuf wire format).
2155
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2156
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2157
- */
2158
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinary = function(bytes) {
2159
- var reader = new jspb.BinaryReader(bytes);
2160
- var msg = new proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus;
2161
- return proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader(msg, reader);
2162
- };
2163
-
2164
-
2165
- /**
2166
- * Deserializes binary data (in protobuf wire format) from the
2167
- * given reader into the given message object.
2168
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} msg The message object to deserialize into.
2169
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2170
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2171
- */
2172
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader = function(msg, reader) {
2173
- while (reader.nextField()) {
2174
- if (reader.isEndGroup()) {
2175
- break;
2176
- }
2177
- var field = reader.getFieldNumber();
2178
- switch (field) {
2179
- case 1:
2180
- var value = /** @type {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} */ (reader.readEnum());
2181
- msg.setCode(value);
2182
- break;
2183
- case 2:
2184
- var value = /** @type {string} */ (reader.readString());
2185
- msg.setMessage(value);
2186
- break;
2187
- default:
2188
- reader.skipField();
2189
- break;
2190
- }
2191
- }
2192
- return msg;
2193
- };
2194
-
2195
-
2196
- /**
2197
- * Serializes the message to binary data (in protobuf wire format).
2198
- * @return {!Uint8Array}
2199
- */
2200
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.serializeBinary = function() {
2201
- var writer = new jspb.BinaryWriter();
2202
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter(this, writer);
2203
- return writer.getResultBuffer();
2204
- };
2205
-
2206
-
2207
- /**
2208
- * Serializes the given message to binary data (in protobuf wire
2209
- * format), writing to the given BinaryWriter.
2210
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} message
2211
- * @param {!jspb.BinaryWriter} writer
2212
- * @suppress {unusedLocalVariables} f is only used for nested messages
2213
- */
2214
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter = function(message, writer) {
2215
- var f = undefined;
2216
- f = message.getCode();
2217
- if (f !== 0.0) {
2218
- writer.writeEnum(
2219
- 1,
2220
- f
2221
- );
2222
- }
2223
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
2224
- if (f != null) {
2225
- writer.writeString(
2226
- 2,
2227
- f
2228
- );
2229
- }
2230
- };
2231
-
2232
-
2233
- /**
2234
- * @enum {number}
2235
- */
2236
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode = {
2237
- STATUS_CODE_UNSPECIFIED: 0,
2238
- STATUS_CODE_OK: 1,
2239
- STATUS_CODE_ERROR: 2
2240
- };
2241
-
2242
- /**
2243
- * optional StatusCode code = 1;
2244
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode}
2245
- */
2246
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.getCode = function() {
2247
- return /** @type {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2248
- };
2249
-
2250
-
2251
- /**
2252
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} value
2253
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2254
- */
2255
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.setCode = function(value) {
2256
- return jspb.Message.setProto3EnumField(this, 1, value);
2257
- };
2258
-
2259
-
2260
- /**
2261
- * optional string message = 2;
2262
- * @return {string}
2263
- */
2264
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.getMessage = function() {
2265
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2266
- };
2267
-
2268
-
2269
- /**
2270
- * @param {string} value
2271
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2272
- */
2273
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.setMessage = function(value) {
2274
- return jspb.Message.setField(this, 2, value);
2275
- };
2276
-
2277
-
2278
- /**
2279
- * Clears the field making it undefined.
2280
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2281
- */
2282
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.clearMessage = function() {
2283
- return jspb.Message.setField(this, 2, undefined);
2284
- };
2285
-
2286
-
2287
- /**
2288
- * Returns whether this field is set.
2289
- * @return {boolean}
2290
- */
2291
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.hasMessage = function() {
2292
- return jspb.Message.getField(this, 2) != null;
2293
- };
2294
-
2295
-
2296
- /**
2297
- * optional string trace_id = 1;
2298
- * @return {string}
2299
- */
2300
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getTraceId = function() {
2301
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2302
- };
2303
-
2304
-
2305
- /**
2306
- * @param {string} value
2307
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2308
- */
2309
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setTraceId = function(value) {
2310
- return jspb.Message.setProto3StringField(this, 1, value);
2311
- };
2312
-
2313
-
2314
- /**
2315
- * optional string span_id = 2;
2316
- * @return {string}
2317
- */
2318
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getSpanId = function() {
2319
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2320
- };
2321
-
2322
-
2323
- /**
2324
- * @param {string} value
2325
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2326
- */
2327
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setSpanId = function(value) {
2328
- return jspb.Message.setProto3StringField(this, 2, value);
2329
- };
2330
-
2331
-
2332
- /**
2333
- * optional google.protobuf.Timestamp end_time = 3;
2334
- * @return {?proto.google.protobuf.Timestamp}
2335
- */
2336
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getEndTime = function() {
2337
- return /** @type{?proto.google.protobuf.Timestamp} */ (
2338
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2339
- };
2340
-
2341
-
2342
- /**
2343
- * @param {?proto.google.protobuf.Timestamp|undefined} value
2344
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2345
- */
2346
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setEndTime = function(value) {
2347
- return jspb.Message.setWrapperField(this, 3, value);
2348
- };
2349
-
2350
-
2351
- /**
2352
- * Clears the message field making it undefined.
2353
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2354
- */
2355
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.clearEndTime = function() {
2356
- return this.setEndTime(undefined);
2357
- };
2358
-
2359
-
2360
- /**
2361
- * Returns whether this field is set.
2362
- * @return {boolean}
2363
- */
2364
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.hasEndTime = function() {
2365
- return jspb.Message.getField(this, 3) != null;
2366
- };
2367
-
2368
-
2369
- /**
2370
- * optional SpanStatus status = 4;
2371
- * @return {?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2372
- */
2373
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getStatus = function() {
2374
- return /** @type{?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} */ (
2375
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus, 4));
2376
- };
2377
-
2378
-
2379
- /**
2380
- * @param {?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus|undefined} value
2381
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2382
- */
2383
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setStatus = function(value) {
2384
- return jspb.Message.setWrapperField(this, 4, value);
2385
- };
2386
-
2387
-
2388
- /**
2389
- * Clears the message field making it undefined.
2390
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2391
- */
2392
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.clearStatus = function() {
2393
- return this.setStatus(undefined);
2394
- };
2395
-
2396
-
2397
- /**
2398
- * Returns whether this field is set.
2399
- * @return {boolean}
2400
- */
2401
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.hasStatus = function() {
2402
- return jspb.Message.getField(this, 4) != null;
2403
- };
2404
-
2405
-
2406
-
2407
-
2408
-
2409
- if (jspb.Message.GENERATE_TO_OBJECT) {
2410
- /**
2411
- * Creates an object representation of this proto.
2412
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2413
- * Optional fields that are not set will be set to undefined.
2414
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2415
- * For the list of reserved names please see:
2416
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2417
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2418
- * JSPB instance for transitional soy proto support:
2419
- * http://goto/soy-param-migration
2420
- * @return {!Object}
2421
- */
2422
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.toObject = function(opt_includeInstance) {
2423
- return proto.gateway.parallax.v1.FinishSpanResponse.toObject(opt_includeInstance, this);
2424
- };
2425
-
2426
-
2427
- /**
2428
- * Static version of the {@see toObject} method.
2429
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2430
- * the JSPB instance for transitional soy proto support:
2431
- * http://goto/soy-param-migration
2432
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} msg The msg instance to transform.
2433
- * @return {!Object}
2434
- * @suppress {unusedLocalVariables} f is only used for nested messages
2435
- */
2436
- proto.gateway.parallax.v1.FinishSpanResponse.toObject = function(includeInstance, msg) {
2437
- var f, obj = {
2438
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.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.gateway.parallax.v1.FinishSpanResponse}
2453
- */
2454
- proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinary = function(bytes) {
2455
- var reader = new jspb.BinaryReader(bytes);
2456
- var msg = new proto.gateway.parallax.v1.FinishSpanResponse;
2457
- return proto.gateway.parallax.v1.FinishSpanResponse.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.gateway.parallax.v1.FinishSpanResponse} msg The message object to deserialize into.
2465
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2466
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse}
2467
- */
2468
- proto.gateway.parallax.v1.FinishSpanResponse.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 = new proto_common_v1_status_pb.ResponseStatus;
2477
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2478
- msg.setStatus(value);
2479
- break;
2480
- default:
2481
- reader.skipField();
2482
- break;
2483
- }
2484
- }
2485
- return msg;
2486
- };
2487
-
2488
-
2489
- /**
2490
- * Serializes the message to binary data (in protobuf wire format).
2491
- * @return {!Uint8Array}
2492
- */
2493
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.serializeBinary = function() {
2494
- var writer = new jspb.BinaryWriter();
2495
- proto.gateway.parallax.v1.FinishSpanResponse.serializeBinaryToWriter(this, writer);
2496
- return writer.getResultBuffer();
2497
- };
2498
-
2499
-
2500
- /**
2501
- * Serializes the given message to binary data (in protobuf wire
2502
- * format), writing to the given BinaryWriter.
2503
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} message
2504
- * @param {!jspb.BinaryWriter} writer
2505
- * @suppress {unusedLocalVariables} f is only used for nested messages
2506
- */
2507
- proto.gateway.parallax.v1.FinishSpanResponse.serializeBinaryToWriter = function(message, writer) {
2508
- var f = undefined;
2509
- f = message.getStatus();
2510
- if (f != null) {
2511
- writer.writeMessage(
2512
- 1,
2513
- f,
2514
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2515
- );
2516
- }
2517
- };
2518
-
2519
-
2520
- /**
2521
- * optional common.v1.ResponseStatus status = 1;
2522
- * @return {?proto.common.v1.ResponseStatus}
2523
- */
2524
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.getStatus = function() {
2525
- return /** @type{?proto.common.v1.ResponseStatus} */ (
2526
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
2527
- };
2528
-
2529
-
2530
- /**
2531
- * @param {?proto.common.v1.ResponseStatus|undefined} value
2532
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse} returns this
2533
- */
2534
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.setStatus = function(value) {
2535
- return jspb.Message.setWrapperField(this, 1, value);
2536
- };
2537
-
2538
-
2539
- /**
2540
- * Clears the message field making it undefined.
2541
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse} returns this
2542
- */
2543
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.clearStatus = function() {
2544
- return this.setStatus(undefined);
2545
- };
2546
-
2547
-
2548
- /**
2549
- * Returns whether this field is set.
2550
- * @return {boolean}
2551
- */
2552
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.hasStatus = function() {
2553
- return jspb.Message.getField(this, 1) != null;
2554
- };
2555
-
2556
-
2557
-
2558
-
2559
-
2560
- if (jspb.Message.GENERATE_TO_OBJECT) {
2561
- /**
2562
- * Creates an object representation of this proto.
2563
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2564
- * Optional fields that are not set will be set to undefined.
2565
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2566
- * For the list of reserved names please see:
2567
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2568
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2569
- * JSPB instance for transitional soy proto support:
2570
- * http://goto/soy-param-migration
2571
- * @return {!Object}
2572
- */
2573
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.toObject = function(opt_includeInstance) {
2574
- return proto.gateway.parallax.v1.AddSpanEventRequest.toObject(opt_includeInstance, this);
2575
- };
2576
-
2577
-
2578
- /**
2579
- * Static version of the {@see toObject} method.
2580
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2581
- * the JSPB instance for transitional soy proto support:
2582
- * http://goto/soy-param-migration
2583
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} msg The msg instance to transform.
2584
- * @return {!Object}
2585
- * @suppress {unusedLocalVariables} f is only used for nested messages
2586
- */
2587
- proto.gateway.parallax.v1.AddSpanEventRequest.toObject = function(includeInstance, msg) {
2588
- var f, obj = {
2589
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2590
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2591
- eventName: jspb.Message.getFieldWithDefault(msg, 3, ""),
2592
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
2593
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2594
- };
2595
-
2596
- if (includeInstance) {
2597
- obj.$jspbMessageInstance = msg;
2598
- }
2599
- return obj;
2600
- };
2601
- }
2602
-
2603
-
2604
- /**
2605
- * Deserializes binary data (in protobuf wire format).
2606
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2607
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest}
2608
- */
2609
- proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinary = function(bytes) {
2610
- var reader = new jspb.BinaryReader(bytes);
2611
- var msg = new proto.gateway.parallax.v1.AddSpanEventRequest;
2612
- return proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinaryFromReader(msg, reader);
2613
- };
2614
-
2615
-
2616
- /**
2617
- * Deserializes binary data (in protobuf wire format) from the
2618
- * given reader into the given message object.
2619
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} msg The message object to deserialize into.
2620
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2621
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest}
2622
- */
2623
- proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinaryFromReader = function(msg, reader) {
2624
- while (reader.nextField()) {
2625
- if (reader.isEndGroup()) {
2626
- break;
2627
- }
2628
- var field = reader.getFieldNumber();
2629
- switch (field) {
2630
- case 1:
2631
- var value = /** @type {string} */ (reader.readString());
2632
- msg.setTraceId(value);
2633
- break;
2634
- case 2:
2635
- var value = /** @type {string} */ (reader.readString());
2636
- msg.setSpanId(value);
2637
- break;
2638
- case 3:
2639
- var value = /** @type {string} */ (reader.readString());
2640
- msg.setEventName(value);
2641
- break;
2642
- case 4:
2643
- var value = msg.getAttributesMap();
2644
- reader.readMessage(value, function(message, reader) {
2645
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
2646
- });
2647
- break;
2648
- case 5:
2649
- var value = new google_protobuf_timestamp_pb.Timestamp;
2650
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2651
- msg.setTimestamp(value);
2652
- break;
2653
- default:
2654
- reader.skipField();
2655
- break;
2656
- }
2657
- }
2658
- return msg;
2659
- };
2660
-
2661
-
2662
- /**
2663
- * Serializes the message to binary data (in protobuf wire format).
2664
- * @return {!Uint8Array}
2665
- */
2666
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.serializeBinary = function() {
2667
- var writer = new jspb.BinaryWriter();
2668
- proto.gateway.parallax.v1.AddSpanEventRequest.serializeBinaryToWriter(this, writer);
2669
- return writer.getResultBuffer();
2670
- };
2671
-
2672
-
2673
- /**
2674
- * Serializes the given message to binary data (in protobuf wire
2675
- * format), writing to the given BinaryWriter.
2676
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} message
2677
- * @param {!jspb.BinaryWriter} writer
2678
- * @suppress {unusedLocalVariables} f is only used for nested messages
2679
- */
2680
- proto.gateway.parallax.v1.AddSpanEventRequest.serializeBinaryToWriter = function(message, writer) {
2681
- var f = undefined;
2682
- f = message.getTraceId();
2683
- if (f.length > 0) {
2684
- writer.writeString(
2685
- 1,
2686
- f
2687
- );
2688
- }
2689
- f = message.getSpanId();
2690
- if (f.length > 0) {
2691
- writer.writeString(
2692
- 2,
2693
- f
2694
- );
2695
- }
2696
- f = message.getEventName();
2697
- if (f.length > 0) {
2698
- writer.writeString(
2699
- 3,
2700
- f
2701
- );
2702
- }
2703
- f = message.getAttributesMap(true);
2704
- if (f && f.getLength() > 0) {
2705
- f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
2706
- }
2707
- f = message.getTimestamp();
2708
- if (f != null) {
2709
- writer.writeMessage(
2710
- 5,
2711
- f,
2712
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2713
- );
2714
- }
2715
- };
2716
-
2717
-
2718
- /**
2719
- * optional string trace_id = 1;
2720
- * @return {string}
2721
- */
2722
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getTraceId = function() {
2723
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2724
- };
2725
-
2726
-
2727
- /**
2728
- * @param {string} value
2729
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2730
- */
2731
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setTraceId = function(value) {
2732
- return jspb.Message.setProto3StringField(this, 1, value);
2733
- };
2734
-
2735
-
2736
- /**
2737
- * optional string span_id = 2;
2738
- * @return {string}
2739
- */
2740
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getSpanId = function() {
2741
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2742
- };
2743
-
2744
-
2745
- /**
2746
- * @param {string} value
2747
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2748
- */
2749
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setSpanId = function(value) {
2750
- return jspb.Message.setProto3StringField(this, 2, value);
2751
- };
2752
-
2753
-
2754
- /**
2755
- * optional string event_name = 3;
2756
- * @return {string}
2757
- */
2758
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getEventName = function() {
2759
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2760
- };
2761
-
2762
-
2763
- /**
2764
- * @param {string} value
2765
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2766
- */
2767
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setEventName = function(value) {
2768
- return jspb.Message.setProto3StringField(this, 3, value);
2769
- };
2770
-
2771
-
2772
- /**
2773
- * map<string, string> attributes = 4;
2774
- * @param {boolean=} opt_noLazyCreate Do not create the map if
2775
- * empty, instead returning `undefined`
2776
- * @return {!jspb.Map<string,string>}
2777
- */
2778
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
2779
- return /** @type {!jspb.Map<string,string>} */ (
2780
- jspb.Message.getMapField(this, 4, opt_noLazyCreate,
2781
- null));
2782
- };
2783
-
2784
-
2785
- /**
2786
- * Clears values from the map. The map will be non-null.
2787
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2788
- */
2789
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.clearAttributesMap = function() {
2790
- this.getAttributesMap().clear();
2791
- return this;
2792
- };
2793
-
2794
-
2795
- /**
2796
- * optional google.protobuf.Timestamp timestamp = 5;
2797
- * @return {?proto.google.protobuf.Timestamp}
2798
- */
2799
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getTimestamp = function() {
2800
- return /** @type{?proto.google.protobuf.Timestamp} */ (
2801
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
2802
- };
2803
-
2804
-
2805
- /**
2806
- * @param {?proto.google.protobuf.Timestamp|undefined} value
2807
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2808
- */
2809
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setTimestamp = function(value) {
2810
- return jspb.Message.setWrapperField(this, 5, value);
2811
- };
2812
-
2813
-
2814
- /**
2815
- * Clears the message field making it undefined.
2816
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2817
- */
2818
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.clearTimestamp = function() {
2819
- return this.setTimestamp(undefined);
2820
- };
2821
-
2822
-
2823
- /**
2824
- * Returns whether this field is set.
2825
- * @return {boolean}
2826
- */
2827
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.hasTimestamp = function() {
2828
- return jspb.Message.getField(this, 5) != null;
2829
- };
2830
-
2831
-
2832
-
2833
-
2834
-
2835
- if (jspb.Message.GENERATE_TO_OBJECT) {
2836
- /**
2837
- * Creates an object representation of this proto.
2838
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2839
- * Optional fields that are not set will be set to undefined.
2840
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2841
- * For the list of reserved names please see:
2842
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2843
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2844
- * JSPB instance for transitional soy proto support:
2845
- * http://goto/soy-param-migration
2846
- * @return {!Object}
2847
- */
2848
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.toObject = function(opt_includeInstance) {
2849
- return proto.gateway.parallax.v1.AddSpanEventResponse.toObject(opt_includeInstance, this);
2850
- };
2851
-
2852
-
2853
- /**
2854
- * Static version of the {@see toObject} method.
2855
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2856
- * the JSPB instance for transitional soy proto support:
2857
- * http://goto/soy-param-migration
2858
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} msg The msg instance to transform.
2859
- * @return {!Object}
2860
- * @suppress {unusedLocalVariables} f is only used for nested messages
2861
- */
2862
- proto.gateway.parallax.v1.AddSpanEventResponse.toObject = function(includeInstance, msg) {
2863
- var f, obj = {
2864
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
2865
- };
2866
-
2867
- if (includeInstance) {
2868
- obj.$jspbMessageInstance = msg;
2869
- }
2870
- return obj;
2871
- };
2872
- }
2873
-
2874
-
2875
- /**
2876
- * Deserializes binary data (in protobuf wire format).
2877
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2878
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse}
2879
- */
2880
- proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinary = function(bytes) {
2881
- var reader = new jspb.BinaryReader(bytes);
2882
- var msg = new proto.gateway.parallax.v1.AddSpanEventResponse;
2883
- return proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinaryFromReader(msg, reader);
2884
- };
2885
-
2886
-
2887
- /**
2888
- * Deserializes binary data (in protobuf wire format) from the
2889
- * given reader into the given message object.
2890
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} msg The message object to deserialize into.
2891
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2892
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse}
2893
- */
2894
- proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinaryFromReader = function(msg, reader) {
2895
- while (reader.nextField()) {
2896
- if (reader.isEndGroup()) {
2897
- break;
2898
- }
2899
- var field = reader.getFieldNumber();
2900
- switch (field) {
2901
- case 1:
2902
- var value = new proto_common_v1_status_pb.ResponseStatus;
2903
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2904
- msg.setStatus(value);
2905
- break;
2906
- default:
2907
- reader.skipField();
2908
- break;
2909
- }
2910
- }
2911
- return msg;
2912
- };
2913
-
2914
-
2915
- /**
2916
- * Serializes the message to binary data (in protobuf wire format).
2917
- * @return {!Uint8Array}
2918
- */
2919
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.serializeBinary = function() {
2920
- var writer = new jspb.BinaryWriter();
2921
- proto.gateway.parallax.v1.AddSpanEventResponse.serializeBinaryToWriter(this, writer);
2922
- return writer.getResultBuffer();
2923
- };
2924
-
2925
-
2926
- /**
2927
- * Serializes the given message to binary data (in protobuf wire
2928
- * format), writing to the given BinaryWriter.
2929
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} message
2930
- * @param {!jspb.BinaryWriter} writer
2931
- * @suppress {unusedLocalVariables} f is only used for nested messages
2932
- */
2933
- proto.gateway.parallax.v1.AddSpanEventResponse.serializeBinaryToWriter = function(message, writer) {
2934
- var f = undefined;
2935
- f = message.getStatus();
2936
- if (f != null) {
2937
- writer.writeMessage(
2938
- 1,
2939
- f,
2940
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2941
- );
2942
- }
2943
- };
2944
-
2945
-
2946
- /**
2947
- * optional common.v1.ResponseStatus status = 1;
2948
- * @return {?proto.common.v1.ResponseStatus}
2949
- */
2950
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.getStatus = function() {
2951
- return /** @type{?proto.common.v1.ResponseStatus} */ (
2952
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
2953
- };
2954
-
2955
-
2956
- /**
2957
- * @param {?proto.common.v1.ResponseStatus|undefined} value
2958
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse} returns this
2959
- */
2960
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.setStatus = function(value) {
2961
- return jspb.Message.setWrapperField(this, 1, value);
2962
- };
2963
-
2964
-
2965
- /**
2966
- * Clears the message field making it undefined.
2967
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse} returns this
2968
- */
2969
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.clearStatus = function() {
2970
- return this.setStatus(undefined);
2971
- };
2972
-
2973
-
2974
- /**
2975
- * Returns whether this field is set.
2976
- * @return {boolean}
2977
- */
2978
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.hasStatus = function() {
2979
- return jspb.Message.getField(this, 1) != null;
2980
- };
2981
-
2982
-
2983
-
2984
-
2985
-
2986
- if (jspb.Message.GENERATE_TO_OBJECT) {
2987
- /**
2988
- * Creates an object representation of this proto.
2989
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2990
- * Optional fields that are not set will be set to undefined.
2991
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2992
- * For the list of reserved names please see:
2993
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2994
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2995
- * JSPB instance for transitional soy proto support:
2996
- * http://goto/soy-param-migration
2997
- * @return {!Object}
2998
- */
2999
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.toObject = function(opt_includeInstance) {
3000
- return proto.gateway.parallax.v1.AddSpanErrorRequest.toObject(opt_includeInstance, this);
3001
- };
3002
-
3003
-
3004
- /**
3005
- * Static version of the {@see toObject} method.
3006
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3007
- * the JSPB instance for transitional soy proto support:
3008
- * http://goto/soy-param-migration
3009
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} msg The msg instance to transform.
3010
- * @return {!Object}
3011
- * @suppress {unusedLocalVariables} f is only used for nested messages
3012
- */
3013
- proto.gateway.parallax.v1.AddSpanErrorRequest.toObject = function(includeInstance, msg) {
3014
- var f, obj = {
3015
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3016
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3017
- errorType: jspb.Message.getFieldWithDefault(msg, 3, ""),
3018
- message: jspb.Message.getFieldWithDefault(msg, 4, ""),
3019
- stackTrace: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
3020
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
3021
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
3022
- };
3023
-
3024
- if (includeInstance) {
3025
- obj.$jspbMessageInstance = msg;
3026
- }
3027
- return obj;
3028
- };
3029
- }
3030
-
3031
-
3032
- /**
3033
- * Deserializes binary data (in protobuf wire format).
3034
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3035
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest}
3036
- */
3037
- proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinary = function(bytes) {
3038
- var reader = new jspb.BinaryReader(bytes);
3039
- var msg = new proto.gateway.parallax.v1.AddSpanErrorRequest;
3040
- return proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinaryFromReader(msg, reader);
3041
- };
3042
-
3043
-
3044
- /**
3045
- * Deserializes binary data (in protobuf wire format) from the
3046
- * given reader into the given message object.
3047
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} msg The message object to deserialize into.
3048
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3049
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest}
3050
- */
3051
- proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinaryFromReader = function(msg, reader) {
1033
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader = function(msg, reader) {
3052
1034
  while (reader.nextField()) {
3053
1035
  if (reader.isEndGroup()) {
3054
1036
  break;
@@ -3057,31 +1039,17 @@
3057
1039
  switch (field) {
3058
1040
  case 1:
3059
1041
  var value = /** @type {string} */ (reader.readString());
3060
- msg.setTraceId(value);
1042
+ msg.setChainId(value);
3061
1043
  break;
3062
1044
  case 2:
3063
1045
  var value = /** @type {string} */ (reader.readString());
3064
- msg.setSpanId(value);
1046
+ msg.setTxHash(value);
3065
1047
  break;
3066
1048
  case 3:
3067
1049
  var value = /** @type {string} */ (reader.readString());
3068
- msg.setErrorType(value);
1050
+ msg.setDetails(value);
3069
1051
  break;
3070
1052
  case 4:
3071
- var value = /** @type {string} */ (reader.readString());
3072
- msg.setMessage(value);
3073
- break;
3074
- case 5:
3075
- var value = /** @type {string} */ (reader.readString());
3076
- msg.setStackTrace(value);
3077
- break;
3078
- case 6:
3079
- var value = msg.getAttributesMap();
3080
- reader.readMessage(value, function(message, reader) {
3081
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
3082
- });
3083
- break;
3084
- case 7:
3085
1053
  var value = new google_protobuf_timestamp_pb.Timestamp;
3086
1054
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3087
1055
  msg.setTimestamp(value);
@@ -3099,9 +1067,9 @@
3099
1067
  * Serializes the message to binary data (in protobuf wire format).
3100
1068
  * @return {!Uint8Array}
3101
1069
  */
3102
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.serializeBinary = function() {
1070
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.serializeBinary = function() {
3103
1071
  var writer = new jspb.BinaryWriter();
3104
- proto.gateway.parallax.v1.AddSpanErrorRequest.serializeBinaryToWriter(this, writer);
1072
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter(this, writer);
3105
1073
  return writer.getResultBuffer();
3106
1074
  };
3107
1075
 
@@ -3109,55 +1077,37 @@
3109
1077
  /**
3110
1078
  * Serializes the given message to binary data (in protobuf wire
3111
1079
  * format), writing to the given BinaryWriter.
3112
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} message
1080
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} message
3113
1081
  * @param {!jspb.BinaryWriter} writer
3114
1082
  * @suppress {unusedLocalVariables} f is only used for nested messages
3115
1083
  */
3116
- proto.gateway.parallax.v1.AddSpanErrorRequest.serializeBinaryToWriter = function(message, writer) {
1084
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter = function(message, writer) {
3117
1085
  var f = undefined;
3118
- f = message.getTraceId();
1086
+ f = message.getChainId();
3119
1087
  if (f.length > 0) {
3120
1088
  writer.writeString(
3121
1089
  1,
3122
1090
  f
3123
1091
  );
3124
1092
  }
3125
- f = message.getSpanId();
1093
+ f = message.getTxHash();
3126
1094
  if (f.length > 0) {
3127
1095
  writer.writeString(
3128
1096
  2,
3129
1097
  f
3130
1098
  );
3131
1099
  }
3132
- f = message.getErrorType();
3133
- if (f.length > 0) {
3134
- writer.writeString(
3135
- 3,
3136
- f
3137
- );
3138
- }
3139
- f = message.getMessage();
3140
- if (f.length > 0) {
3141
- writer.writeString(
3142
- 4,
3143
- f
3144
- );
3145
- }
3146
- f = /** @type {string} */ (jspb.Message.getField(message, 5));
1100
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
3147
1101
  if (f != null) {
3148
1102
  writer.writeString(
3149
- 5,
1103
+ 3,
3150
1104
  f
3151
1105
  );
3152
1106
  }
3153
- f = message.getAttributesMap(true);
3154
- if (f && f.getLength() > 0) {
3155
- f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
3156
- }
3157
1107
  f = message.getTimestamp();
3158
1108
  if (f != null) {
3159
1109
  writer.writeMessage(
3160
- 7,
1110
+ 4,
3161
1111
  f,
3162
1112
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3163
1113
  );
@@ -3166,312 +1116,65 @@
3166
1116
 
3167
1117
 
3168
1118
  /**
3169
- * optional string trace_id = 1;
3170
- * @return {string}
3171
- */
3172
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getTraceId = function() {
3173
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3174
- };
3175
-
3176
-
3177
- /**
3178
- * @param {string} value
3179
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3180
- */
3181
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setTraceId = function(value) {
3182
- return jspb.Message.setProto3StringField(this, 1, value);
3183
- };
3184
-
3185
-
3186
- /**
3187
- * optional string span_id = 2;
3188
- * @return {string}
3189
- */
3190
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getSpanId = function() {
3191
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3192
- };
3193
-
3194
-
3195
- /**
3196
- * @param {string} value
3197
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3198
- */
3199
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setSpanId = function(value) {
3200
- return jspb.Message.setProto3StringField(this, 2, value);
3201
- };
3202
-
3203
-
3204
- /**
3205
- * optional string error_type = 3;
3206
- * @return {string}
3207
- */
3208
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getErrorType = function() {
3209
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3210
- };
3211
-
3212
-
3213
- /**
3214
- * @param {string} value
3215
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3216
- */
3217
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setErrorType = function(value) {
3218
- return jspb.Message.setProto3StringField(this, 3, value);
3219
- };
3220
-
3221
-
3222
- /**
3223
- * optional string message = 4;
3224
- * @return {string}
3225
- */
3226
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getMessage = function() {
3227
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3228
- };
3229
-
3230
-
3231
- /**
3232
- * @param {string} value
3233
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3234
- */
3235
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setMessage = function(value) {
3236
- return jspb.Message.setProto3StringField(this, 4, value);
3237
- };
3238
-
3239
-
3240
- /**
3241
- * optional string stack_trace = 5;
1119
+ * optional string chain_id = 1;
3242
1120
  * @return {string}
3243
1121
  */
3244
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getStackTrace = function() {
3245
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3246
- };
3247
-
3248
-
3249
- /**
3250
- * @param {string} value
3251
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3252
- */
3253
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setStackTrace = function(value) {
3254
- return jspb.Message.setField(this, 5, value);
3255
- };
3256
-
3257
-
3258
- /**
3259
- * Clears the field making it undefined.
3260
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3261
- */
3262
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearStackTrace = function() {
3263
- return jspb.Message.setField(this, 5, undefined);
3264
- };
3265
-
3266
-
3267
- /**
3268
- * Returns whether this field is set.
3269
- * @return {boolean}
3270
- */
3271
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.hasStackTrace = function() {
3272
- return jspb.Message.getField(this, 5) != null;
3273
- };
3274
-
3275
-
3276
- /**
3277
- * map<string, string> attributes = 6;
3278
- * @param {boolean=} opt_noLazyCreate Do not create the map if
3279
- * empty, instead returning `undefined`
3280
- * @return {!jspb.Map<string,string>}
3281
- */
3282
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
3283
- return /** @type {!jspb.Map<string,string>} */ (
3284
- jspb.Message.getMapField(this, 6, opt_noLazyCreate,
3285
- null));
3286
- };
3287
-
3288
-
3289
- /**
3290
- * Clears values from the map. The map will be non-null.
3291
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3292
- */
3293
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearAttributesMap = function() {
3294
- this.getAttributesMap().clear();
3295
- return this;
3296
- };
3297
-
3298
-
3299
- /**
3300
- * optional google.protobuf.Timestamp timestamp = 7;
3301
- * @return {?proto.google.protobuf.Timestamp}
3302
- */
3303
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getTimestamp = function() {
3304
- return /** @type{?proto.google.protobuf.Timestamp} */ (
3305
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
3306
- };
3307
-
3308
-
3309
- /**
3310
- * @param {?proto.google.protobuf.Timestamp|undefined} value
3311
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3312
- */
3313
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setTimestamp = function(value) {
3314
- return jspb.Message.setWrapperField(this, 7, value);
3315
- };
3316
-
3317
-
3318
- /**
3319
- * Clears the message field making it undefined.
3320
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3321
- */
3322
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearTimestamp = function() {
3323
- return this.setTimestamp(undefined);
3324
- };
3325
-
3326
-
3327
- /**
3328
- * Returns whether this field is set.
3329
- * @return {boolean}
3330
- */
3331
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.hasTimestamp = function() {
3332
- return jspb.Message.getField(this, 7) != null;
3333
- };
3334
-
3335
-
3336
-
3337
-
3338
-
3339
- if (jspb.Message.GENERATE_TO_OBJECT) {
3340
- /**
3341
- * Creates an object representation of this proto.
3342
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3343
- * Optional fields that are not set will be set to undefined.
3344
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3345
- * For the list of reserved names please see:
3346
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3347
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3348
- * JSPB instance for transitional soy proto support:
3349
- * http://goto/soy-param-migration
3350
- * @return {!Object}
3351
- */
3352
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.toObject = function(opt_includeInstance) {
3353
- return proto.gateway.parallax.v1.AddSpanErrorResponse.toObject(opt_includeInstance, this);
3354
- };
3355
-
3356
-
3357
- /**
3358
- * Static version of the {@see toObject} method.
3359
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3360
- * the JSPB instance for transitional soy proto support:
3361
- * http://goto/soy-param-migration
3362
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} msg The msg instance to transform.
3363
- * @return {!Object}
3364
- * @suppress {unusedLocalVariables} f is only used for nested messages
3365
- */
3366
- proto.gateway.parallax.v1.AddSpanErrorResponse.toObject = function(includeInstance, msg) {
3367
- var f, obj = {
3368
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
3369
- };
3370
-
3371
- if (includeInstance) {
3372
- obj.$jspbMessageInstance = msg;
3373
- }
3374
- return obj;
3375
- };
3376
- }
3377
-
3378
-
3379
- /**
3380
- * Deserializes binary data (in protobuf wire format).
3381
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3382
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse}
3383
- */
3384
- proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinary = function(bytes) {
3385
- var reader = new jspb.BinaryReader(bytes);
3386
- var msg = new proto.gateway.parallax.v1.AddSpanErrorResponse;
3387
- return proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinaryFromReader(msg, reader);
3388
- };
3389
-
3390
-
3391
- /**
3392
- * Deserializes binary data (in protobuf wire format) from the
3393
- * given reader into the given message object.
3394
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} msg The message object to deserialize into.
3395
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3396
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse}
3397
- */
3398
- proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinaryFromReader = function(msg, reader) {
3399
- while (reader.nextField()) {
3400
- if (reader.isEndGroup()) {
3401
- break;
3402
- }
3403
- var field = reader.getFieldNumber();
3404
- switch (field) {
3405
- case 1:
3406
- var value = new proto_common_v1_status_pb.ResponseStatus;
3407
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3408
- msg.setStatus(value);
3409
- break;
3410
- default:
3411
- reader.skipField();
3412
- break;
3413
- }
3414
- }
3415
- return msg;
1122
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getChainId = function() {
1123
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3416
1124
  };
3417
1125
 
3418
1126
 
3419
1127
  /**
3420
- * Serializes the message to binary data (in protobuf wire format).
3421
- * @return {!Uint8Array}
1128
+ * @param {string} value
1129
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3422
1130
  */
3423
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.serializeBinary = function() {
3424
- var writer = new jspb.BinaryWriter();
3425
- proto.gateway.parallax.v1.AddSpanErrorResponse.serializeBinaryToWriter(this, writer);
3426
- return writer.getResultBuffer();
1131
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setChainId = function(value) {
1132
+ return jspb.Message.setProto3StringField(this, 1, value);
3427
1133
  };
3428
1134
 
3429
1135
 
3430
1136
  /**
3431
- * Serializes the given message to binary data (in protobuf wire
3432
- * format), writing to the given BinaryWriter.
3433
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} message
3434
- * @param {!jspb.BinaryWriter} writer
3435
- * @suppress {unusedLocalVariables} f is only used for nested messages
1137
+ * optional string tx_hash = 2;
1138
+ * @return {string}
3436
1139
  */
3437
- proto.gateway.parallax.v1.AddSpanErrorResponse.serializeBinaryToWriter = function(message, writer) {
3438
- var f = undefined;
3439
- f = message.getStatus();
3440
- if (f != null) {
3441
- writer.writeMessage(
3442
- 1,
3443
- f,
3444
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3445
- );
3446
- }
1140
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getTxHash = function() {
1141
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3447
1142
  };
3448
1143
 
3449
1144
 
3450
1145
  /**
3451
- * optional common.v1.ResponseStatus status = 1;
3452
- * @return {?proto.common.v1.ResponseStatus}
1146
+ * @param {string} value
1147
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3453
1148
  */
3454
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.getStatus = function() {
3455
- return /** @type{?proto.common.v1.ResponseStatus} */ (
3456
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1149
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setTxHash = function(value) {
1150
+ return jspb.Message.setProto3StringField(this, 2, value);
3457
1151
  };
3458
1152
 
3459
1153
 
3460
1154
  /**
3461
- * @param {?proto.common.v1.ResponseStatus|undefined} value
3462
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse} returns this
3463
- */
3464
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.setStatus = function(value) {
3465
- return jspb.Message.setWrapperField(this, 1, value);
1155
+ * optional string details = 3;
1156
+ * @return {string}
1157
+ */
1158
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getDetails = function() {
1159
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3466
1160
  };
3467
1161
 
3468
1162
 
3469
1163
  /**
3470
- * Clears the message field making it undefined.
3471
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse} returns this
1164
+ * @param {string} value
1165
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3472
1166
  */
3473
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.clearStatus = function() {
3474
- return this.setStatus(undefined);
1167
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setDetails = function(value) {
1168
+ return jspb.Message.setField(this, 3, value);
1169
+ };
1170
+
1171
+
1172
+ /**
1173
+ * Clears the field making it undefined.
1174
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1175
+ */
1176
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.clearDetails = function() {
1177
+ return jspb.Message.setField(this, 3, undefined);
3475
1178
  };
3476
1179
 
3477
1180
 
@@ -3479,39 +1182,51 @@
3479
1182
  * Returns whether this field is set.
3480
1183
  * @return {boolean}
3481
1184
  */
3482
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.hasStatus = function() {
3483
- return jspb.Message.getField(this, 1) != null;
1185
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.hasDetails = function() {
1186
+ return jspb.Message.getField(this, 3) != null;
3484
1187
  };
3485
1188
 
3486
1189
 
3487
-
3488
1190
  /**
3489
- * Oneof group definitions for this message. Each group defines the field
3490
- * numbers belonging to that group. When of these fields' value is set, all
3491
- * other fields in the group are cleared. During deserialization, if multiple
3492
- * fields are encountered for a group, only the last value seen will be kept.
3493
- * @private {!Array<!Array<number>>}
3494
- * @const
1191
+ * optional google.protobuf.Timestamp timestamp = 4;
1192
+ * @return {?proto.google.protobuf.Timestamp}
3495
1193
  */
3496
- proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_ = [[10]];
1194
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getTimestamp = function() {
1195
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1196
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
1197
+ };
1198
+
3497
1199
 
3498
1200
  /**
3499
- * @enum {number}
1201
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1202
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1203
+ */
1204
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setTimestamp = function(value) {
1205
+ return jspb.Message.setWrapperField(this, 4, value);
1206
+ };
1207
+
1208
+
1209
+ /**
1210
+ * Clears the message field making it undefined.
1211
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3500
1212
  */
3501
- proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase = {
3502
- HINT_TYPE_NOT_SET: 0,
3503
- CHAIN_TRANSACTION: 10
1213
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.clearTimestamp = function() {
1214
+ return this.setTimestamp(undefined);
3504
1215
  };
3505
1216
 
1217
+
3506
1218
  /**
3507
- * @return {proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase}
1219
+ * Returns whether this field is set.
1220
+ * @return {boolean}
3508
1221
  */
3509
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getHintTypeCase = function() {
3510
- return /** @type {proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase} */(jspb.Message.computeOneofCase(this, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_[0]));
1222
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.hasTimestamp = function() {
1223
+ return jspb.Message.getField(this, 4) != null;
3511
1224
  };
3512
1225
 
3513
1226
 
3514
1227
 
1228
+
1229
+
3515
1230
  if (jspb.Message.GENERATE_TO_OBJECT) {
3516
1231
  /**
3517
1232
  * Creates an object representation of this proto.
@@ -3525,8 +1240,8 @@
3525
1240
  * http://goto/soy-param-migration
3526
1241
  * @return {!Object}
3527
1242
  */
3528
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.toObject = function(opt_includeInstance) {
3529
- return proto.gateway.parallax.v1.AddSpanHintRequest.toObject(opt_includeInstance, this);
1243
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.toObject = function(opt_includeInstance) {
1244
+ return proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject(opt_includeInstance, this);
3530
1245
  };
3531
1246
 
3532
1247
 
@@ -3535,16 +1250,15 @@
3535
1250
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3536
1251
  * the JSPB instance for transitional soy proto support:
3537
1252
  * http://goto/soy-param-migration
3538
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} msg The msg instance to transform.
1253
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} msg The msg instance to transform.
3539
1254
  * @return {!Object}
3540
1255
  * @suppress {unusedLocalVariables} f is only used for nested messages
3541
1256
  */
3542
- proto.gateway.parallax.v1.AddSpanHintRequest.toObject = function(includeInstance, msg) {
1257
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject = function(includeInstance, msg) {
3543
1258
  var f, obj = {
3544
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3545
- parentSpanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3546
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3547
- chainTransaction: (f = msg.getChainTransaction()) && proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject(includeInstance, f)
1259
+ eventName: jspb.Message.getFieldWithDefault(msg, 1, ""),
1260
+ details: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
1261
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
3548
1262
  };
3549
1263
 
3550
1264
  if (includeInstance) {
@@ -3558,23 +1272,23 @@
3558
1272
  /**
3559
1273
  * Deserializes binary data (in protobuf wire format).
3560
1274
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
3561
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest}
1275
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3562
1276
  */
3563
- proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinary = function(bytes) {
1277
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinary = function(bytes) {
3564
1278
  var reader = new jspb.BinaryReader(bytes);
3565
- var msg = new proto.gateway.parallax.v1.AddSpanHintRequest;
3566
- return proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinaryFromReader(msg, reader);
1279
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest.Event;
1280
+ return proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader(msg, reader);
3567
1281
  };
3568
1282
 
3569
1283
 
3570
1284
  /**
3571
1285
  * Deserializes binary data (in protobuf wire format) from the
3572
1286
  * given reader into the given message object.
3573
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} msg The message object to deserialize into.
1287
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} msg The message object to deserialize into.
3574
1288
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3575
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest}
1289
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3576
1290
  */
3577
- proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinaryFromReader = function(msg, reader) {
1291
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader = function(msg, reader) {
3578
1292
  while (reader.nextField()) {
3579
1293
  if (reader.isEndGroup()) {
3580
1294
  break;
@@ -3583,22 +1297,17 @@
3583
1297
  switch (field) {
3584
1298
  case 1:
3585
1299
  var value = /** @type {string} */ (reader.readString());
3586
- msg.setTraceId(value);
1300
+ msg.setEventName(value);
3587
1301
  break;
3588
1302
  case 2:
3589
1303
  var value = /** @type {string} */ (reader.readString());
3590
- msg.setParentSpanId(value);
1304
+ msg.setDetails(value);
3591
1305
  break;
3592
1306
  case 3:
3593
1307
  var value = new google_protobuf_timestamp_pb.Timestamp;
3594
1308
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3595
1309
  msg.setTimestamp(value);
3596
1310
  break;
3597
- case 10:
3598
- var value = new proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction;
3599
- reader.readMessage(value,proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader);
3600
- msg.setChainTransaction(value);
3601
- break;
3602
1311
  default:
3603
1312
  reader.skipField();
3604
1313
  break;
@@ -3612,9 +1321,9 @@
3612
1321
  * Serializes the message to binary data (in protobuf wire format).
3613
1322
  * @return {!Uint8Array}
3614
1323
  */
3615
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.serializeBinary = function() {
1324
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.serializeBinary = function() {
3616
1325
  var writer = new jspb.BinaryWriter();
3617
- proto.gateway.parallax.v1.AddSpanHintRequest.serializeBinaryToWriter(this, writer);
1326
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter(this, writer);
3618
1327
  return writer.getResultBuffer();
3619
1328
  };
3620
1329
 
@@ -3622,21 +1331,21 @@
3622
1331
  /**
3623
1332
  * Serializes the given message to binary data (in protobuf wire
3624
1333
  * format), writing to the given BinaryWriter.
3625
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} message
1334
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} message
3626
1335
  * @param {!jspb.BinaryWriter} writer
3627
1336
  * @suppress {unusedLocalVariables} f is only used for nested messages
3628
1337
  */
3629
- proto.gateway.parallax.v1.AddSpanHintRequest.serializeBinaryToWriter = function(message, writer) {
1338
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter = function(message, writer) {
3630
1339
  var f = undefined;
3631
- f = message.getTraceId();
1340
+ f = message.getEventName();
3632
1341
  if (f.length > 0) {
3633
1342
  writer.writeString(
3634
1343
  1,
3635
1344
  f
3636
1345
  );
3637
1346
  }
3638
- f = message.getParentSpanId();
3639
- if (f.length > 0) {
1347
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1348
+ if (f != null) {
3640
1349
  writer.writeString(
3641
1350
  2,
3642
1351
  f
@@ -3650,275 +1359,241 @@
3650
1359
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3651
1360
  );
3652
1361
  }
3653
- f = message.getChainTransaction();
3654
- if (f != null) {
3655
- writer.writeMessage(
3656
- 10,
3657
- f,
3658
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter
3659
- );
3660
- }
3661
1362
  };
3662
1363
 
3663
1364
 
1365
+ /**
1366
+ * optional string event_name = 1;
1367
+ * @return {string}
1368
+ */
1369
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getEventName = function() {
1370
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1371
+ };
1372
+
3664
1373
 
1374
+ /**
1375
+ * @param {string} value
1376
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1377
+ */
1378
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setEventName = function(value) {
1379
+ return jspb.Message.setProto3StringField(this, 1, value);
1380
+ };
3665
1381
 
3666
1382
 
3667
- if (jspb.Message.GENERATE_TO_OBJECT) {
3668
1383
  /**
3669
- * Creates an object representation of this proto.
3670
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3671
- * Optional fields that are not set will be set to undefined.
3672
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3673
- * For the list of reserved names please see:
3674
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3675
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3676
- * JSPB instance for transitional soy proto support:
3677
- * http://goto/soy-param-migration
3678
- * @return {!Object}
1384
+ * optional string details = 2;
1385
+ * @return {string}
3679
1386
  */
3680
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.toObject = function(opt_includeInstance) {
3681
- return proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject(opt_includeInstance, this);
1387
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getDetails = function() {
1388
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3682
1389
  };
3683
1390
 
3684
1391
 
3685
1392
  /**
3686
- * Static version of the {@see toObject} method.
3687
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3688
- * the JSPB instance for transitional soy proto support:
3689
- * http://goto/soy-param-migration
3690
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} msg The msg instance to transform.
3691
- * @return {!Object}
3692
- * @suppress {unusedLocalVariables} f is only used for nested messages
1393
+ * @param {string} value
1394
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
3693
1395
  */
3694
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject = function(includeInstance, msg) {
3695
- var obj = {
3696
- txHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
3697
- chainId: jspb.Message.getFieldWithDefault(msg, 2, 0)
3698
- };
1396
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setDetails = function(value) {
1397
+ return jspb.Message.setField(this, 2, value);
1398
+ };
3699
1399
 
3700
- if (includeInstance) {
3701
- obj.$jspbMessageInstance = msg;
3702
- }
3703
- return obj;
1400
+
1401
+ /**
1402
+ * Clears the field making it undefined.
1403
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1404
+ */
1405
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.clearDetails = function() {
1406
+ return jspb.Message.setField(this, 2, undefined);
3704
1407
  };
3705
- }
3706
1408
 
3707
1409
 
3708
1410
  /**
3709
- * Deserializes binary data (in protobuf wire format).
3710
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3711
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1411
+ * Returns whether this field is set.
1412
+ * @return {boolean}
3712
1413
  */
3713
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinary = function(bytes) {
3714
- var reader = new jspb.BinaryReader(bytes);
3715
- var msg = new proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction;
3716
- return proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader(msg, reader);
1414
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.hasDetails = function() {
1415
+ return jspb.Message.getField(this, 2) != null;
3717
1416
  };
3718
1417
 
3719
1418
 
3720
1419
  /**
3721
- * Deserializes binary data (in protobuf wire format) from the
3722
- * given reader into the given message object.
3723
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} msg The message object to deserialize into.
3724
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3725
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1420
+ * optional google.protobuf.Timestamp timestamp = 3;
1421
+ * @return {?proto.google.protobuf.Timestamp}
3726
1422
  */
3727
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader = function(msg, reader) {
3728
- while (reader.nextField()) {
3729
- if (reader.isEndGroup()) {
3730
- break;
3731
- }
3732
- var field = reader.getFieldNumber();
3733
- switch (field) {
3734
- case 1:
3735
- var value = /** @type {string} */ (reader.readString());
3736
- msg.setTxHash(value);
3737
- break;
3738
- case 2:
3739
- var value = /** @type {number} */ (reader.readUint64());
3740
- msg.setChainId(value);
3741
- break;
3742
- default:
3743
- reader.skipField();
3744
- break;
3745
- }
3746
- }
3747
- return msg;
1423
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getTimestamp = function() {
1424
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1425
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
3748
1426
  };
3749
1427
 
3750
1428
 
3751
1429
  /**
3752
- * Serializes the message to binary data (in protobuf wire format).
3753
- * @return {!Uint8Array}
1430
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1431
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1432
+ */
1433
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setTimestamp = function(value) {
1434
+ return jspb.Message.setWrapperField(this, 3, value);
1435
+ };
1436
+
1437
+
1438
+ /**
1439
+ * Clears the message field making it undefined.
1440
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
3754
1441
  */
3755
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.serializeBinary = function() {
3756
- var writer = new jspb.BinaryWriter();
3757
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter(this, writer);
3758
- return writer.getResultBuffer();
1442
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.clearTimestamp = function() {
1443
+ return this.setTimestamp(undefined);
3759
1444
  };
3760
1445
 
3761
1446
 
3762
1447
  /**
3763
- * Serializes the given message to binary data (in protobuf wire
3764
- * format), writing to the given BinaryWriter.
3765
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} message
3766
- * @param {!jspb.BinaryWriter} writer
3767
- * @suppress {unusedLocalVariables} f is only used for nested messages
1448
+ * Returns whether this field is set.
1449
+ * @return {boolean}
3768
1450
  */
3769
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter = function(message, writer) {
3770
- var f = undefined;
3771
- f = message.getTxHash();
3772
- if (f.length > 0) {
3773
- writer.writeString(
3774
- 1,
3775
- f
3776
- );
3777
- }
3778
- f = message.getChainId();
3779
- if (f !== 0) {
3780
- writer.writeUint64(
3781
- 2,
3782
- f
3783
- );
3784
- }
1451
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.hasTimestamp = function() {
1452
+ return jspb.Message.getField(this, 3) != null;
3785
1453
  };
3786
1454
 
3787
1455
 
3788
1456
  /**
3789
- * optional string tx_hash = 1;
1457
+ * optional string name = 1;
3790
1458
  * @return {string}
3791
1459
  */
3792
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.getTxHash = function() {
1460
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
3793
1461
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3794
1462
  };
3795
1463
 
3796
1464
 
3797
1465
  /**
3798
1466
  * @param {string} value
3799
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} returns this
1467
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3800
1468
  */
3801
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.setTxHash = function(value) {
1469
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
3802
1470
  return jspb.Message.setProto3StringField(this, 1, value);
3803
1471
  };
3804
1472
 
3805
1473
 
3806
1474
  /**
3807
- * optional uint64 chain_id = 2;
3808
- * @return {number}
1475
+ * map<string, string> attributes = 2;
1476
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1477
+ * empty, instead returning `undefined`
1478
+ * @return {!jspb.Map<string,string>}
3809
1479
  */
3810
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.getChainId = function() {
3811
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1480
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1481
+ return /** @type {!jspb.Map<string,string>} */ (
1482
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1483
+ null));
3812
1484
  };
3813
1485
 
3814
1486
 
3815
1487
  /**
3816
- * @param {number} value
3817
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} returns this
1488
+ * Clears values from the map. The map will be non-null.
1489
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3818
1490
  */
3819
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.setChainId = function(value) {
3820
- return jspb.Message.setProto3IntField(this, 2, value);
1491
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1492
+ this.getAttributesMap().clear();
1493
+ return this;
3821
1494
  };
3822
1495
 
3823
1496
 
3824
1497
  /**
3825
- * optional string trace_id = 1;
3826
- * @return {string}
1498
+ * repeated string tags = 3;
1499
+ * @return {!Array<string>}
3827
1500
  */
3828
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getTraceId = function() {
3829
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1501
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1502
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
3830
1503
  };
3831
1504
 
3832
1505
 
3833
1506
  /**
3834
- * @param {string} value
3835
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1507
+ * @param {!Array<string>} value
1508
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3836
1509
  */
3837
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setTraceId = function(value) {
3838
- return jspb.Message.setProto3StringField(this, 1, value);
1510
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1511
+ return jspb.Message.setField(this, 3, value || []);
3839
1512
  };
3840
1513
 
3841
1514
 
3842
1515
  /**
3843
- * optional string parent_span_id = 2;
3844
- * @return {string}
1516
+ * @param {string} value
1517
+ * @param {number=} opt_index
1518
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3845
1519
  */
3846
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getParentSpanId = function() {
3847
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1520
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1521
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
3848
1522
  };
3849
1523
 
3850
1524
 
3851
1525
  /**
3852
- * @param {string} value
3853
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1526
+ * Clears the list making it empty but non-null.
1527
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3854
1528
  */
3855
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setParentSpanId = function(value) {
3856
- return jspb.Message.setProto3StringField(this, 2, value);
1529
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1530
+ return this.setTagsList([]);
3857
1531
  };
3858
1532
 
3859
1533
 
3860
1534
  /**
3861
- * optional google.protobuf.Timestamp timestamp = 3;
3862
- * @return {?proto.google.protobuf.Timestamp}
1535
+ * repeated Event events = 4;
1536
+ * @return {!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>}
3863
1537
  */
3864
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getTimestamp = function() {
3865
- return /** @type{?proto.google.protobuf.Timestamp} */ (
3866
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
1538
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getEventsList = function() {
1539
+ return /** @type{!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>} */ (
1540
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.CreateTraceRequest.Event, 4));
3867
1541
  };
3868
1542
 
3869
1543
 
3870
1544
  /**
3871
- * @param {?proto.google.protobuf.Timestamp|undefined} value
3872
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1545
+ * @param {!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>} value
1546
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3873
1547
  */
3874
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setTimestamp = function(value) {
3875
- return jspb.Message.setWrapperField(this, 3, value);
1548
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setEventsList = function(value) {
1549
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
3876
1550
  };
3877
1551
 
3878
1552
 
3879
1553
  /**
3880
- * Clears the message field making it undefined.
3881
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1554
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event=} opt_value
1555
+ * @param {number=} opt_index
1556
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3882
1557
  */
3883
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.clearTimestamp = function() {
3884
- return this.setTimestamp(undefined);
1558
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.addEvents = function(opt_value, opt_index) {
1559
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.gateway.parallax.v1.CreateTraceRequest.Event, opt_index);
3885
1560
  };
3886
1561
 
3887
1562
 
3888
1563
  /**
3889
- * Returns whether this field is set.
3890
- * @return {boolean}
1564
+ * Clears the list making it empty but non-null.
1565
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3891
1566
  */
3892
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.hasTimestamp = function() {
3893
- return jspb.Message.getField(this, 3) != null;
1567
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearEventsList = function() {
1568
+ return this.setEventsList([]);
3894
1569
  };
3895
1570
 
3896
1571
 
3897
1572
  /**
3898
- * optional ChainTransaction chain_transaction = 10;
3899
- * @return {?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1573
+ * optional TxHashHint tx_hash_hint = 5;
1574
+ * @return {?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
3900
1575
  */
3901
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getChainTransaction = function() {
3902
- return /** @type{?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} */ (
3903
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction, 10));
1576
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTxHashHint = function() {
1577
+ return /** @type{?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} */ (
1578
+ jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint, 5));
3904
1579
  };
3905
1580
 
3906
1581
 
3907
1582
  /**
3908
- * @param {?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction|undefined} value
3909
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1583
+ * @param {?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint|undefined} value
1584
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3910
1585
  */
3911
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setChainTransaction = function(value) {
3912
- return jspb.Message.setOneofWrapperField(this, 10, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_[0], value);
1586
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTxHashHint = function(value) {
1587
+ return jspb.Message.setWrapperField(this, 5, value);
3913
1588
  };
3914
1589
 
3915
1590
 
3916
1591
  /**
3917
1592
  * Clears the message field making it undefined.
3918
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1593
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3919
1594
  */
3920
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.clearChainTransaction = function() {
3921
- return this.setChainTransaction(undefined);
1595
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTxHashHint = function() {
1596
+ return this.setTxHashHint(undefined);
3922
1597
  };
3923
1598
 
3924
1599
 
@@ -3926,8 +1601,8 @@
3926
1601
  * Returns whether this field is set.
3927
1602
  * @return {boolean}
3928
1603
  */
3929
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.hasChainTransaction = function() {
3930
- return jspb.Message.getField(this, 10) != null;
1604
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasTxHashHint = function() {
1605
+ return jspb.Message.getField(this, 5) != null;
3931
1606
  };
3932
1607
 
3933
1608
 
@@ -3947,8 +1622,8 @@
3947
1622
  * http://goto/soy-param-migration
3948
1623
  * @return {!Object}
3949
1624
  */
3950
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.toObject = function(opt_includeInstance) {
3951
- return proto.gateway.parallax.v1.AddSpanHintResponse.toObject(opt_includeInstance, this);
1625
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1626
+ return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
3952
1627
  };
3953
1628
 
3954
1629
 
@@ -3957,13 +1632,14 @@
3957
1632
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3958
1633
  * the JSPB instance for transitional soy proto support:
3959
1634
  * http://goto/soy-param-migration
3960
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} msg The msg instance to transform.
1635
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
3961
1636
  * @return {!Object}
3962
1637
  * @suppress {unusedLocalVariables} f is only used for nested messages
3963
1638
  */
3964
- proto.gateway.parallax.v1.AddSpanHintResponse.toObject = function(includeInstance, msg) {
1639
+ proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
3965
1640
  var f, obj = {
3966
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
1641
+ status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1642
+ traceId: jspb.Message.getFieldWithDefault(msg, 2, "")
3967
1643
  };
3968
1644
 
3969
1645
  if (includeInstance) {
@@ -3977,23 +1653,23 @@
3977
1653
  /**
3978
1654
  * Deserializes binary data (in protobuf wire format).
3979
1655
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
3980
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse}
1656
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
3981
1657
  */
3982
- proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinary = function(bytes) {
1658
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
3983
1659
  var reader = new jspb.BinaryReader(bytes);
3984
- var msg = new proto.gateway.parallax.v1.AddSpanHintResponse;
3985
- return proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinaryFromReader(msg, reader);
1660
+ var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1661
+ return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
3986
1662
  };
3987
1663
 
3988
1664
 
3989
1665
  /**
3990
1666
  * Deserializes binary data (in protobuf wire format) from the
3991
1667
  * given reader into the given message object.
3992
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} msg The message object to deserialize into.
1668
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
3993
1669
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3994
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse}
1670
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
3995
1671
  */
3996
- proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinaryFromReader = function(msg, reader) {
1672
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
3997
1673
  while (reader.nextField()) {
3998
1674
  if (reader.isEndGroup()) {
3999
1675
  break;
@@ -4005,6 +1681,10 @@
4005
1681
  reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
4006
1682
  msg.setStatus(value);
4007
1683
  break;
1684
+ case 2:
1685
+ var value = /** @type {string} */ (reader.readString());
1686
+ msg.setTraceId(value);
1687
+ break;
4008
1688
  default:
4009
1689
  reader.skipField();
4010
1690
  break;
@@ -4018,9 +1698,9 @@
4018
1698
  * Serializes the message to binary data (in protobuf wire format).
4019
1699
  * @return {!Uint8Array}
4020
1700
  */
4021
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.serializeBinary = function() {
1701
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
4022
1702
  var writer = new jspb.BinaryWriter();
4023
- proto.gateway.parallax.v1.AddSpanHintResponse.serializeBinaryToWriter(this, writer);
1703
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
4024
1704
  return writer.getResultBuffer();
4025
1705
  };
4026
1706
 
@@ -4028,11 +1708,11 @@
4028
1708
  /**
4029
1709
  * Serializes the given message to binary data (in protobuf wire
4030
1710
  * format), writing to the given BinaryWriter.
4031
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} message
1711
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
4032
1712
  * @param {!jspb.BinaryWriter} writer
4033
1713
  * @suppress {unusedLocalVariables} f is only used for nested messages
4034
1714
  */
4035
- proto.gateway.parallax.v1.AddSpanHintResponse.serializeBinaryToWriter = function(message, writer) {
1715
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
4036
1716
  var f = undefined;
4037
1717
  f = message.getStatus();
4038
1718
  if (f != null) {
@@ -4042,6 +1722,13 @@
4042
1722
  proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
4043
1723
  );
4044
1724
  }
1725
+ f = message.getTraceId();
1726
+ if (f.length > 0) {
1727
+ writer.writeString(
1728
+ 2,
1729
+ f
1730
+ );
1731
+ }
4045
1732
  };
4046
1733
 
4047
1734
 
@@ -4049,7 +1736,7 @@
4049
1736
  * optional common.v1.ResponseStatus status = 1;
4050
1737
  * @return {?proto.common.v1.ResponseStatus}
4051
1738
  */
4052
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.getStatus = function() {
1739
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.getStatus = function() {
4053
1740
  return /** @type{?proto.common.v1.ResponseStatus} */ (
4054
1741
  jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
4055
1742
  };
@@ -4057,18 +1744,18 @@
4057
1744
 
4058
1745
  /**
4059
1746
  * @param {?proto.common.v1.ResponseStatus|undefined} value
4060
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse} returns this
1747
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
4061
1748
  */
4062
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.setStatus = function(value) {
1749
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.setStatus = function(value) {
4063
1750
  return jspb.Message.setWrapperField(this, 1, value);
4064
1751
  };
4065
1752
 
4066
1753
 
4067
1754
  /**
4068
1755
  * Clears the message field making it undefined.
4069
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse} returns this
1756
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
4070
1757
  */
4071
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.clearStatus = function() {
1758
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.clearStatus = function() {
4072
1759
  return this.setStatus(undefined);
4073
1760
  };
4074
1761
 
@@ -4077,11 +1764,29 @@
4077
1764
  * Returns whether this field is set.
4078
1765
  * @return {boolean}
4079
1766
  */
4080
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.hasStatus = function() {
1767
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.hasStatus = function() {
4081
1768
  return jspb.Message.getField(this, 1) != null;
4082
1769
  };
4083
1770
 
4084
1771
 
1772
+ /**
1773
+ * optional string trace_id = 2;
1774
+ * @return {string}
1775
+ */
1776
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.getTraceId = function() {
1777
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1778
+ };
1779
+
1780
+
1781
+ /**
1782
+ * @param {string} value
1783
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1784
+ */
1785
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.setTraceId = function(value) {
1786
+ return jspb.Message.setProto3StringField(this, 2, value);
1787
+ };
1788
+
1789
+
4085
1790
  goog.object.extend(exports$1, proto.gateway.parallax.v1);
4086
1791
  } (parallax_gateway_pb));
4087
1792
  return parallax_gateway_pb;
@@ -4196,46 +1901,6 @@
4196
1901
  return request.serializeBinary();
4197
1902
  }, parallax_gateway_pbExports.CreateTraceResponse.deserializeBinary)
4198
1903
  });
4199
- Object.defineProperty(this, "methodDescriptorStartSpan", {
4200
- enumerable: true,
4201
- configurable: true,
4202
- writable: true,
4203
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/StartSpan', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.StartSpanRequest, parallax_gateway_pbExports.StartSpanResponse, (request) => {
4204
- return request.serializeBinary();
4205
- }, parallax_gateway_pbExports.StartSpanResponse.deserializeBinary)
4206
- });
4207
- Object.defineProperty(this, "methodDescriptorFinishSpan", {
4208
- enumerable: true,
4209
- configurable: true,
4210
- writable: true,
4211
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.FinishSpanRequest, parallax_gateway_pbExports.FinishSpanResponse, (request) => {
4212
- return request.serializeBinary();
4213
- }, parallax_gateway_pbExports.FinishSpanResponse.deserializeBinary)
4214
- });
4215
- Object.defineProperty(this, "methodDescriptorAddSpanEvent", {
4216
- enumerable: true,
4217
- configurable: true,
4218
- writable: true,
4219
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanEventRequest, parallax_gateway_pbExports.AddSpanEventResponse, (request) => {
4220
- return request.serializeBinary();
4221
- }, parallax_gateway_pbExports.AddSpanEventResponse.deserializeBinary)
4222
- });
4223
- Object.defineProperty(this, "methodDescriptorAddSpanError", {
4224
- enumerable: true,
4225
- configurable: true,
4226
- writable: true,
4227
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanErrorRequest, parallax_gateway_pbExports.AddSpanErrorResponse, (request) => {
4228
- return request.serializeBinary();
4229
- }, parallax_gateway_pbExports.AddSpanErrorResponse.deserializeBinary)
4230
- });
4231
- Object.defineProperty(this, "methodDescriptorAddSpanHint", {
4232
- enumerable: true,
4233
- configurable: true,
4234
- writable: true,
4235
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanHintRequest, parallax_gateway_pbExports.AddSpanHintResponse, (request) => {
4236
- return request.serializeBinary();
4237
- }, parallax_gateway_pbExports.AddSpanHintResponse.deserializeBinary)
4238
- });
4239
1904
  if (!options)
4240
1905
  options = {};
4241
1906
  if (!credentials)
@@ -4254,50 +1919,12 @@
4254
1919
  return this.client_.unaryCall(this.hostname_ +
4255
1920
  '/gateway.parallax.v1.ParallaxGatewayService/CreateTrace', request, metadata || {}, this.methodDescriptorCreateTrace);
4256
1921
  }
4257
- startSpan(request, metadata, callback) {
4258
- if (callback !== undefined) {
4259
- return this.client_.rpcCall(this.hostname_ +
4260
- '/gateway.parallax.v1.ParallaxGatewayService/StartSpan', request, metadata || {}, this.methodDescriptorStartSpan, callback);
4261
- }
4262
- return this.client_.unaryCall(this.hostname_ +
4263
- '/gateway.parallax.v1.ParallaxGatewayService/StartSpan', request, metadata || {}, this.methodDescriptorStartSpan);
4264
- }
4265
- finishSpan(request, metadata, callback) {
4266
- if (callback !== undefined) {
4267
- return this.client_.rpcCall(this.hostname_ +
4268
- '/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', request, metadata || {}, this.methodDescriptorFinishSpan, callback);
4269
- }
4270
- return this.client_.unaryCall(this.hostname_ +
4271
- '/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', request, metadata || {}, this.methodDescriptorFinishSpan);
4272
- }
4273
- addSpanEvent(request, metadata, callback) {
4274
- if (callback !== undefined) {
4275
- return this.client_.rpcCall(this.hostname_ +
4276
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', request, metadata || {}, this.methodDescriptorAddSpanEvent, callback);
4277
- }
4278
- return this.client_.unaryCall(this.hostname_ +
4279
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', request, metadata || {}, this.methodDescriptorAddSpanEvent);
4280
- }
4281
- addSpanError(request, metadata, callback) {
4282
- if (callback !== undefined) {
4283
- return this.client_.rpcCall(this.hostname_ +
4284
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', request, metadata || {}, this.methodDescriptorAddSpanError, callback);
4285
- }
4286
- return this.client_.unaryCall(this.hostname_ +
4287
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', request, metadata || {}, this.methodDescriptorAddSpanError);
4288
- }
4289
- addSpanHint(request, metadata, callback) {
4290
- if (callback !== undefined) {
4291
- return this.client_.rpcCall(this.hostname_ +
4292
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', request, metadata || {}, this.methodDescriptorAddSpanHint, callback);
4293
- }
4294
- return this.client_.unaryCall(this.hostname_ +
4295
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', request, metadata || {}, this.methodDescriptorAddSpanHint);
4296
- }
4297
1922
  }
4298
1923
 
1924
+ var timestamp_pbExports = requireTimestamp_pb();
1925
+
4299
1926
  // Parallax SDK Web Client
4300
- const GRPC_GATEWAY_API_URL = "https://gateway-parallax-dev.platform.svc.cluster.local:50053";
1927
+ const GRPC_GATEWAY_API_URL = "https://parallax-gateway.dev.mirador.org:443";
4301
1928
  const debugIssue = (trace, error) => {
4302
1929
  // Handle our own debugging / logging here
4303
1930
  console.error(`[ParallaxClient][${trace}] Error:`, error);
@@ -4470,182 +2097,206 @@
4470
2097
  }
4471
2098
  }
4472
2099
  /**
4473
- * Create a StartSpanRequest with optional attributes and client metadata
4474
- * @param traceId trace id to associate the span with
4475
- * @param name name of the span
4476
- * @param parentSpanId (optional) create a span off a parent span id
4477
- * @param attr (optional) attributes to add to the span
4478
- * @param includeClientMeta (optional) flag to include client metadata (ip, browser, os, etc)
4479
- * @returns
4480
- */
4481
- async createStartSpanRequest({ traceId, name, parentSpanId, attr, includeClientMeta = false }) {
4482
- const startSpanReq = new parallax_gateway_pbExports.StartSpanRequest();
4483
- startSpanReq.setTraceId(traceId);
4484
- startSpanReq.setName(name);
4485
- if (parentSpanId) {
4486
- startSpanReq.setParentSpanId(parentSpanId);
4487
- }
4488
- const spanAttrs = startSpanReq.getAttributesMap();
4489
- if (attr) {
4490
- Object.entries(attr).forEach(([key, value]) => {
4491
- if (key.includes('client.')) {
4492
- console.warn(`Attribute key "${key}" is reserved for client metadata. It will be prefixed with "custom."`);
4493
- }
4494
- else {
4495
- spanAttrs.set(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4496
- }
4497
- });
4498
- }
4499
- try {
4500
- if (includeClientMeta) {
4501
- const clientMetadata = await this.getClientMetadata();
4502
- Object.entries(clientMetadata).forEach(([key, value]) => {
4503
- spanAttrs.set(`client.${key}`, value);
4504
- });
4505
- }
4506
- }
4507
- catch (error) {
4508
- console.error('Error gathering client metadata for span:', error);
4509
- }
4510
- return startSpanReq;
4511
- }
4512
- /**
4513
- * Start a new span within a trace
4514
- * @param params Parameters to start a new span
2100
+ * Create a new trace builder
2101
+ *
2102
+ * Example usage:
2103
+ * ```typescript
2104
+ * const response = await client.trace("swap_execution")
2105
+ * .addAttribute("user", "0xabc...")
2106
+ * .addAttribute("slippage_bps", 25)
2107
+ * .addTag("dex")
2108
+ * .addTag("swap")
2109
+ * .addEvent("wallet_connected", { wallet: "MetaMask" })
2110
+ * .addEvent("quote_received")
2111
+ * .submit("0x123...", "ethereum");
2112
+ * ```
2113
+ *
2114
+ * @param name The name of the trace
2115
+ * @param includeClientMeta Optional flag to automatically include client metadata
2116
+ * @returns A ParallaxTrace builder instance
4515
2117
  */
4516
- async startSpan(params) {
4517
- try {
4518
- return await this.client.startSpan(params, null);
4519
- }
4520
- catch (_error) {
4521
- debugIssue("startSpan", new Error('Error starting span'));
4522
- throw _error;
4523
- }
2118
+ trace(name, includeClientMeta = false) {
2119
+ return new ParallaxTrace(this, name, includeClientMeta);
4524
2120
  }
4525
- /**
4526
- * Create a FinishSpanRequest
4527
- * @param params Parameters to finish a span - traceId, spanId, status (optional) (success, errorMessage)
4528
- * @returns FinishSpanRequest
4529
- */
4530
- createFinishSpanRequest({ traceId, spanId, status }) {
4531
- const request = new parallax_gateway_pbExports.FinishSpanRequest();
4532
- request.setTraceId(traceId);
4533
- request.setSpanId(spanId);
4534
- if (status !== undefined) {
4535
- const spanStatus = new parallax_gateway_pbExports.FinishSpanRequest.SpanStatus();
4536
- spanStatus.setCode(status.success ? parallax_gateway_pbExports.FinishSpanRequest.SpanStatus.StatusCode.STATUS_CODE_OK : parallax_gateway_pbExports.FinishSpanRequest.SpanStatus.StatusCode.STATUS_CODE_ERROR);
4537
- if (status.errorMessage) {
4538
- spanStatus.setMessage(status.errorMessage);
4539
- }
4540
- request.setStatus(spanStatus);
4541
- }
4542
- return request;
2121
+ }
2122
+ /**
2123
+ * Builder class for constructing traces with method chaining
2124
+ * Automatically handles web-specific features like client metadata
2125
+ */
2126
+ class ParallaxTrace {
2127
+ constructor(client, name, includeClientMeta = false) {
2128
+ Object.defineProperty(this, "name", {
2129
+ enumerable: true,
2130
+ configurable: true,
2131
+ writable: true,
2132
+ value: void 0
2133
+ });
2134
+ Object.defineProperty(this, "attributes", {
2135
+ enumerable: true,
2136
+ configurable: true,
2137
+ writable: true,
2138
+ value: {}
2139
+ });
2140
+ Object.defineProperty(this, "tags", {
2141
+ enumerable: true,
2142
+ configurable: true,
2143
+ writable: true,
2144
+ value: []
2145
+ });
2146
+ Object.defineProperty(this, "events", {
2147
+ enumerable: true,
2148
+ configurable: true,
2149
+ writable: true,
2150
+ value: []
2151
+ });
2152
+ Object.defineProperty(this, "txHashHint", {
2153
+ enumerable: true,
2154
+ configurable: true,
2155
+ writable: true,
2156
+ value: void 0
2157
+ });
2158
+ Object.defineProperty(this, "client", {
2159
+ enumerable: true,
2160
+ configurable: true,
2161
+ writable: true,
2162
+ value: void 0
2163
+ });
2164
+ Object.defineProperty(this, "includeClientMeta", {
2165
+ enumerable: true,
2166
+ configurable: true,
2167
+ writable: true,
2168
+ value: void 0
2169
+ });
2170
+ this.client = client;
2171
+ this.name = name;
2172
+ this.includeClientMeta = includeClientMeta;
4543
2173
  }
4544
2174
  /**
4545
- * Finish a span within a trace
4546
- * @param params Parameters to finish a span
2175
+ * Add an attribute to the trace
2176
+ * @param key Attribute key
2177
+ * @param value Attribute value (will be converted to string)
2178
+ * @returns This trace builder for chaining
4547
2179
  */
4548
- async finishSpan(params) {
4549
- try {
4550
- return await this.client.finishSpan(params, null);
4551
- }
4552
- catch (_error) {
4553
- debugIssue("finishSpan", new Error('Error finishing span'));
4554
- throw _error;
4555
- }
2180
+ addAttribute(key, value) {
2181
+ this.attributes[key] = String(value);
2182
+ return this;
4556
2183
  }
4557
2184
  /**
4558
- * Creates the add span event request
4559
- * @param params - Parameters to create an AddSpanEventRequest - traceId, spanId, eventName, attr (optional)
4560
- * @returns AddSpanEventRequest
2185
+ * Add multiple attributes to the trace
2186
+ * @param attributes Object containing key-value pairs
2187
+ * @returns This trace builder for chaining
4561
2188
  */
4562
- createAddSpanEventRequest({ traceId, spanId, eventName, attr }) {
4563
- const request = new parallax_gateway_pbExports.AddSpanEventRequest();
4564
- request.setTraceId(traceId);
4565
- request.setSpanId(spanId);
4566
- request.setEventName(eventName);
4567
- const eventAttrs = request.getAttributesMap();
4568
- if (attr) {
4569
- Object.entries(attr).forEach(([key, value]) => {
4570
- eventAttrs.set(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4571
- });
2189
+ addAttributes(attributes) {
2190
+ for (const [key, value] of Object.entries(attributes)) {
2191
+ this.attributes[key] = String(value);
4572
2192
  }
4573
- eventAttrs.set('timestamp', new Date().toISOString());
4574
- return request;
2193
+ return this;
4575
2194
  }
4576
2195
  /**
4577
- * Add an event to a span
4578
- * @param params Parameters to add an event to a span
2196
+ * Add a tag to the trace
2197
+ * @param tag Tag to add
2198
+ * @returns This trace builder for chaining
4579
2199
  */
4580
- async addSpanEvent(params) {
4581
- try {
4582
- return await this.client.addSpanEvent(params, null);
4583
- }
4584
- catch (_error) {
4585
- debugIssue("addSpanEvent", new Error('Error adding span event'));
4586
- throw _error;
4587
- }
2200
+ addTag(tag) {
2201
+ this.tags.push(tag);
2202
+ return this;
4588
2203
  }
4589
2204
  /**
4590
- * Creates the add span error request
4591
- * @param params - params used to generate the error request ( traceid, span id, error message, error type, stack trace)
4592
- * @returns AddSpanErrorRequest
2205
+ * Add multiple tags to the trace
2206
+ * @param tags Array of tags to add
2207
+ * @returns This trace builder for chaining
4593
2208
  */
4594
- createAddSpanErrorRequest({ traceId, spanId, errorMessage, errorType, stackTrace }) {
4595
- const request = new parallax_gateway_pbExports.AddSpanErrorRequest();
4596
- request.setTraceId(traceId);
4597
- request.setSpanId(spanId);
4598
- request.setMessage(errorMessage);
4599
- if (errorType) {
4600
- request.setErrorType(errorType);
4601
- }
4602
- if (stackTrace) {
4603
- request.setStackTrace(stackTrace);
4604
- }
4605
- return request;
2209
+ addTags(tags) {
2210
+ this.tags.push(...tags);
2211
+ return this;
4606
2212
  }
4607
2213
  /**
4608
- * Add an error to a span
4609
- * @param params Parameters to add an error to a span
2214
+ * Add an event to the trace
2215
+ * @param eventName Name of the event
2216
+ * @param details Optional details (can be a JSON string or object that will be stringified)
2217
+ * @param timestamp Optional timestamp (defaults to current time)
2218
+ * @returns This trace builder for chaining
4610
2219
  */
4611
- async addSpanError(params) {
4612
- try {
4613
- return await this.client.addSpanError(params, null);
4614
- }
4615
- catch (_error) {
4616
- debugIssue("addSpanError", new Error('Error adding span error'));
4617
- throw _error;
4618
- }
2220
+ addEvent(eventName, details, timestamp) {
2221
+ const detailsString = typeof details === 'object' && details !== null
2222
+ ? JSON.stringify(details)
2223
+ : details;
2224
+ this.events.push({
2225
+ eventName,
2226
+ details: detailsString,
2227
+ timestamp: timestamp || new Date(),
2228
+ });
2229
+ return this;
4619
2230
  }
4620
2231
  /**
4621
- * Creates the add span hint request
4622
- * @param params - params used to generate the span hint (trace id, parentSpanId, txHash and chainId)
4623
- * @returns AddSpanHintRequest
2232
+ * Set or update the transaction hash hint
2233
+ * @param txHash Transaction hash
2234
+ * @param chainId Chain ID (e.g., "ethereum", "polygon")
2235
+ * @param details Optional details about the transaction
2236
+ * @param timestamp Optional timestamp (defaults to current time)
2237
+ * @returns This trace builder for chaining
4624
2238
  */
4625
- createAddSpanHintRequest({ traceId, parentSpanId, txHash, chainId }) {
4626
- const hintReq = new parallax_gateway_pbExports.AddSpanHintRequest();
4627
- hintReq.setTraceId(traceId);
4628
- hintReq.setParentSpanId(parentSpanId);
4629
- if (txHash && chainId !== undefined) {
4630
- const chainTxReq = new parallax_gateway_pbExports.AddSpanHintRequest.ChainTransaction();
4631
- chainTxReq.setTxHash(txHash);
4632
- chainTxReq.setChainId(chainId);
4633
- hintReq.setChainTransaction(chainTxReq);
4634
- }
4635
- return hintReq;
2239
+ setTxHash(txHash, chainId, details, timestamp) {
2240
+ this.txHashHint = {
2241
+ txHash,
2242
+ chainId,
2243
+ details,
2244
+ timestamp: timestamp || new Date(),
2245
+ };
2246
+ return this;
4636
2247
  }
4637
- /**
4638
- * Add a hint to a span
4639
- * @param params Parameters to add a hint to a span
4640
- */
4641
- async addSpanHint(params) {
4642
- try {
4643
- return await this.client.addSpanHint(params, null);
2248
+ async submit(txHash, chainId, details) {
2249
+ // If txHash and chainId are provided in submit(), they override any previously set txHashHint
2250
+ const finalTxHashHint = txHash && chainId ? {
2251
+ txHash,
2252
+ chainId,
2253
+ details,
2254
+ timestamp: new Date(),
2255
+ } : this.txHashHint;
2256
+ // Build the CreateTraceRequest
2257
+ const request = new parallax_gateway_pbExports.CreateTraceRequest();
2258
+ request.setName(this.name);
2259
+ request.setTagsList(this.tags);
2260
+ // Add attributes
2261
+ const attrsMap = request.getAttributesMap();
2262
+ for (const [key, value] of Object.entries(this.attributes)) {
2263
+ attrsMap.set(key, value);
2264
+ }
2265
+ // Add client metadata if requested
2266
+ if (this.includeClientMeta) {
2267
+ const clientMetadata = await this.client.getClientMetadata();
2268
+ for (const [key, value] of Object.entries(clientMetadata)) {
2269
+ attrsMap.set(`client.${key}`, value);
2270
+ }
4644
2271
  }
4645
- catch (_error) {
4646
- debugIssue("addSpanHint", new Error('Error adding span hint'));
4647
- throw _error;
2272
+ // Add events
2273
+ const eventsList = [];
2274
+ for (const event of this.events) {
2275
+ const eventMsg = new parallax_gateway_pbExports.CreateTraceRequest.Event();
2276
+ eventMsg.setEventName(event.eventName);
2277
+ if (event.details) {
2278
+ eventMsg.setDetails(event.details);
2279
+ }
2280
+ const timestamp = new timestamp_pbExports.Timestamp();
2281
+ timestamp.fromDate(event.timestamp);
2282
+ eventMsg.setTimestamp(timestamp);
2283
+ eventsList.push(eventMsg);
2284
+ }
2285
+ request.setEventsList(eventsList);
2286
+ // Add transaction hash hint if present
2287
+ if (finalTxHashHint) {
2288
+ const txHint = new parallax_gateway_pbExports.CreateTraceRequest.TxHashHint();
2289
+ txHint.setTxHash(finalTxHashHint.txHash);
2290
+ txHint.setChainId(finalTxHashHint.chainId);
2291
+ if (finalTxHashHint.details) {
2292
+ txHint.setDetails(finalTxHashHint.details);
2293
+ }
2294
+ const timestamp = new timestamp_pbExports.Timestamp();
2295
+ timestamp.fromDate(finalTxHashHint.timestamp);
2296
+ txHint.setTimestamp(timestamp);
2297
+ request.setTxHashHint(txHint);
4648
2298
  }
2299
+ return this.client.createTrace(request);
4649
2300
  }
4650
2301
  }
4651
2302
 
@@ -4803,8 +2454,7 @@
4803
2454
  * Start a new transaction trace
4804
2455
  * Called when user initiates a transaction
4805
2456
  *
4806
- * Note: Since createTrace now automatically creates a root span, we don't need
4807
- * to call startSpan separately. The rootSpanId from the response is the parent span.
2457
+ * Uses the builder pattern to create a trace with events
4808
2458
  *
4809
2459
  * @param txData - Transaction data
4810
2460
  * @param name - Name for the trace (e.g., 'SendingTrace', 'SwappingTrace')
@@ -4818,39 +2468,37 @@
4818
2468
  }
4819
2469
  try {
4820
2470
  const txId = `tx_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
4821
- const timestamp = new Date().toISOString();
4822
- // Create trace attributes
4823
- const traceAttributes = {
4824
- transactionId: txId,
4825
- walletAddress: txData.walletAddress || txData.from,
4826
- network: txData.network || 'Unknown',
4827
- transactionStart: timestamp,
2471
+ const timestamp = new Date();
2472
+ // Build the trace using the builder pattern
2473
+ const builder = this.client
2474
+ .trace(name, options?.includeClientMeta ?? true)
2475
+ .addAttribute('transactionId', txId)
2476
+ .addAttribute('walletAddress', txData.walletAddress || txData.from)
2477
+ .addAttribute('network', txData.network || 'Unknown')
2478
+ .addAttribute('transactionStart', timestamp.toISOString())
2479
+ .addAttribute('from', txData.from)
2480
+ .addAttribute('to', txData.to)
2481
+ .addAttribute('value', txData.value)
2482
+ .addTags(['transaction', 'wallet', txData.network || 'unknown'])
2483
+ .addEvent('transaction_initiated', {
4828
2484
  from: txData.from,
4829
2485
  to: txData.to,
4830
2486
  value: txData.value,
4831
- };
4832
- // Add any additional transaction data
2487
+ timestamp: timestamp.toISOString(),
2488
+ });
2489
+ // Add any additional transaction data as attributes
4833
2490
  if (txData.additionalData) {
4834
2491
  Object.entries(txData.additionalData).forEach(([key, value]) => {
4835
- traceAttributes[key] = typeof value === 'object' ? JSON.stringify(value) : String(value);
2492
+ builder.addAttribute(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4836
2493
  });
4837
2494
  }
4838
- // Create a trace for this transaction
4839
- const createTraceReq = await this.client.createTraceRequest({
4840
- name: name,
4841
- attr: traceAttributes,
4842
- tags: ['transaction', 'wallet', txData.network || 'unknown'],
4843
- includeClientMeta: options?.includeClientMeta ?? true,
4844
- });
4845
- const traceResponse = await this.client.createTrace(createTraceReq);
2495
+ // Submit the trace
2496
+ const traceResponse = await builder.submit();
4846
2497
  const traceId = traceResponse.getTraceId();
4847
- const rootSpanId = traceResponse.getRootSpanId();
4848
2498
  // Store transaction info
4849
2499
  this.activeTransactions.set(txId, {
4850
2500
  traceId,
4851
- rootSpanId,
4852
- spanId: rootSpanId, // Use rootSpanId as the main span for this transaction
4853
- timestamp,
2501
+ timestamp: timestamp.toISOString(),
4854
2502
  txHash: null,
4855
2503
  from: txData.from,
4856
2504
  to: txData.to,
@@ -4859,18 +2507,10 @@
4859
2507
  console.log('[ParallaxService] Transaction trace started:', {
4860
2508
  txId,
4861
2509
  traceId,
4862
- rootSpanId,
4863
2510
  from: txData.from,
4864
2511
  to: txData.to,
4865
2512
  });
4866
- // Add initial event to the root span
4867
- await this.addTransactionEvent(txId, 'transaction_initiated', {
4868
- from: txData.from,
4869
- to: txData.to,
4870
- value: txData.value,
4871
- timestamp,
4872
- });
4873
- return { traceId, rootSpanId, txId };
2513
+ return { traceId, rootSpanId: traceId, txId };
4874
2514
  }
4875
2515
  catch (error) {
4876
2516
  console.error('[ParallaxService] Failed to start transaction trace:', error);
@@ -4881,9 +2521,13 @@
4881
2521
  * Associate a transaction hash with an existing trace
4882
2522
  * Called when the transaction hash is available after signing/sending
4883
2523
  *
2524
+ * NOTE: This method is deprecated as the new API does not support adding hints to existing traces.
2525
+ * Transaction hashes should be provided at trace creation time via the builder's submit(txHash, chainId) method.
2526
+ *
4884
2527
  * @param txId - Transaction identifier returned from startTransactionTrace
4885
2528
  * @param txHash - Blockchain transaction hash
4886
2529
  * @param chainId - Chain ID
2530
+ * @deprecated Use submit(txHash, chainId) when creating the trace instead
4887
2531
  */
4888
2532
  async associateTransactionHash(txId, txHash, chainId) {
4889
2533
  const txInfo = this.activeTransactions.get(txId);
@@ -4891,44 +2535,26 @@
4891
2535
  console.warn(`[ParallaxService] Transaction ${txId} not found in active transactions`);
4892
2536
  return;
4893
2537
  }
4894
- if (!this.client) {
4895
- console.warn('[ParallaxService] Client not initialized');
4896
- return;
4897
- }
4898
- try {
4899
- // Update stored tx info
4900
- txInfo.txHash = txHash;
4901
- this.activeTransactions.set(txId, txInfo);
4902
- // Add chain hint to correlate with blockchain events
4903
- const hintReq = this.client.createAddSpanHintRequest({
4904
- traceId: txInfo.traceId,
4905
- parentSpanId: txInfo.rootSpanId,
4906
- txHash: txHash,
4907
- chainId: chainId,
4908
- });
4909
- await this.client.addSpanHint(hintReq);
4910
- // Add event for transaction sent
4911
- await this.addTransactionEvent(txId, 'transaction_hash_available', {
4912
- txHash,
4913
- chainId: chainId.toString(),
4914
- timestamp: new Date().toISOString(),
4915
- });
4916
- console.log('[ParallaxService] Transaction hash associated with trace:', {
4917
- txId,
4918
- txHash,
4919
- traceId: txInfo.traceId,
4920
- });
4921
- }
4922
- catch (error) {
4923
- console.error('[ParallaxService] Failed to associate transaction hash:', error);
4924
- }
2538
+ // Update stored tx info
2539
+ txInfo.txHash = txHash;
2540
+ this.activeTransactions.set(txId, txInfo);
2541
+ console.warn('[ParallaxService] associateTransactionHash is deprecated. The new API does not support adding transaction hashes after trace creation. Please provide the txHash when creating the trace using submit(txHash, chainId).');
2542
+ console.log('[ParallaxService] Transaction hash updated in local cache:', {
2543
+ txId,
2544
+ txHash,
2545
+ traceId: txInfo.traceId,
2546
+ });
4925
2547
  }
4926
2548
  /**
4927
2549
  * Add an event to a transaction trace
4928
2550
  *
2551
+ * NOTE: This method is deprecated as the new API does not support adding events to existing traces.
2552
+ * Events should be added to the trace builder before calling submit().
2553
+ *
4929
2554
  * @param txId - Transaction identifier
4930
2555
  * @param eventName - Event name
4931
2556
  * @param attributes - Event attributes
2557
+ * @deprecated Use the trace builder's addEvent() method before calling submit() instead
4932
2558
  */
4933
2559
  async addTransactionEvent(txId, eventName, attributes = {}) {
4934
2560
  const txInfo = this.activeTransactions.get(txId);
@@ -4936,35 +2562,18 @@
4936
2562
  console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot add event '${eventName}'`);
4937
2563
  return;
4938
2564
  }
4939
- if (!this.client || !txInfo.spanId) {
4940
- console.warn('[ParallaxService] Client not initialized or span not available');
4941
- return;
4942
- }
4943
- try {
4944
- // Convert attributes to plain object with string values
4945
- const eventAttributes = {};
4946
- Object.entries(attributes).forEach(([key, value]) => {
4947
- eventAttributes[key] = typeof value === 'object' ? JSON.stringify(value) : String(value);
4948
- });
4949
- const request = this.client.createAddSpanEventRequest({
4950
- traceId: txInfo.traceId,
4951
- spanId: txInfo.spanId,
4952
- eventName: eventName,
4953
- attr: eventAttributes,
4954
- });
4955
- await this.client.addSpanEvent(request);
4956
- }
4957
- catch (error) {
4958
- console.error(`[ParallaxService] Failed to add transaction event '${eventName}':`, error);
4959
- }
2565
+ console.warn('[ParallaxService] addTransactionEvent is deprecated. The new API does not support adding events after trace creation. Events should be added using the builder pattern before calling submit().');
4960
2566
  }
4961
2567
  /**
4962
2568
  * Add an error to a transaction trace
4963
- * Creates a proper span error event in Parallax
2569
+ *
2570
+ * NOTE: This method is deprecated as the new API does not support adding errors to existing traces.
2571
+ * Errors should be added as events to the trace builder before calling submit().
4964
2572
  *
4965
2573
  * @param txId - Transaction identifier
4966
2574
  * @param error - Error object or message
4967
2575
  * @param errorType - Type/category of error (e.g., 'TransactionError', 'NetworkError', 'UserRejection')
2576
+ * @deprecated Use the trace builder's addEvent() method to add error events before calling submit() instead
4968
2577
  */
4969
2578
  async addTransactionError(txId, error, errorType = 'TransactionError') {
4970
2579
  const txInfo = this.activeTransactions.get(txId);
@@ -4972,45 +2581,17 @@
4972
2581
  console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot add error.`);
4973
2582
  return;
4974
2583
  }
4975
- if (!this.client || !txInfo.spanId) {
4976
- console.warn('[ParallaxService] Client not initialized or span not available');
4977
- return;
4978
- }
4979
- try {
4980
- // Extract error message and stack trace
4981
- let errorMessage = '';
4982
- let stackTrace;
4983
- if (error instanceof Error) {
4984
- errorMessage = error.message;
4985
- stackTrace = error.stack;
4986
- }
4987
- else {
4988
- errorMessage = String(error);
4989
- }
4990
- const request = this.client.createAddSpanErrorRequest({
4991
- traceId: txInfo.traceId,
4992
- spanId: txInfo.spanId,
4993
- errorMessage: errorMessage,
4994
- errorType: errorType,
4995
- stackTrace: stackTrace,
4996
- });
4997
- await this.client.addSpanError(request);
4998
- console.log('[ParallaxService] Transaction error added to trace:', {
4999
- txId,
5000
- errorType,
5001
- message: error instanceof Error ? error.message : String(error),
5002
- });
5003
- }
5004
- catch (err) {
5005
- console.error('[ParallaxService] Failed to add transaction error:', err);
5006
- }
2584
+ console.warn('[ParallaxService] addTransactionError is deprecated. The new API does not support adding errors after trace creation. Add error events using the builder pattern before calling submit().');
5007
2585
  }
5008
2586
  /**
5009
2587
  * Finish a transaction trace
5010
- * Called when transaction is confirmed or permanently failed
2588
+ *
2589
+ * NOTE: This method is deprecated as the new API does not support span lifecycle management.
2590
+ * Traces are completed when submit() is called on the builder.
5011
2591
  *
5012
2592
  * @param txId - Transaction identifier
5013
2593
  * @param options - Finish options (success, error message)
2594
+ * @deprecated Traces are automatically completed when submit() is called
5014
2595
  */
5015
2596
  async finishTransactionTrace(txId, options = { success: true }) {
5016
2597
  const txInfo = this.activeTransactions.get(txId);
@@ -5018,40 +2599,15 @@
5018
2599
  console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot finish.`);
5019
2600
  return;
5020
2601
  }
5021
- if (!this.client || !txInfo.spanId) {
5022
- console.warn('[ParallaxService] Client not initialized or span not available');
5023
- return;
5024
- }
5025
- try {
5026
- // Add final event
5027
- await this.addTransactionEvent(txId, options.success ? 'transaction_completed' : 'transaction_failed', {
5028
- success: options.success.toString(),
5029
- error: options.error || '',
5030
- duration: (Date.now() - new Date(txInfo.timestamp).getTime()).toString(),
5031
- timestamp: new Date().toISOString(),
5032
- });
5033
- // Finish the span
5034
- const request = this.client.createFinishSpanRequest({
5035
- traceId: txInfo.traceId,
5036
- spanId: txInfo.spanId,
5037
- status: {
5038
- success: options.success,
5039
- errorMessage: options.error || '',
5040
- },
5041
- });
5042
- await this.client.finishSpan(request);
5043
- console.log('[ParallaxService] Transaction trace finished:', {
5044
- txId,
5045
- traceId: txInfo.traceId,
5046
- success: options.success,
5047
- txHash: txInfo.txHash,
5048
- });
5049
- // Remove from active transactions
5050
- this.activeTransactions.delete(txId);
5051
- }
5052
- catch (error) {
5053
- console.error('[ParallaxService] Failed to finish transaction trace:', error);
5054
- }
2602
+ console.warn('[ParallaxService] finishTransactionTrace is deprecated. The new API does not support span lifecycle. Traces are completed when submit() is called.');
2603
+ console.log('[ParallaxService] Transaction trace marked as finished (local only):', {
2604
+ txId,
2605
+ traceId: txInfo.traceId,
2606
+ success: options.success,
2607
+ txHash: txInfo.txHash,
2608
+ });
2609
+ // Remove from active transactions
2610
+ this.activeTransactions.delete(txId);
5055
2611
  }
5056
2612
  /**
5057
2613
  * Get info about an active transaction
@@ -5089,21 +2645,12 @@
5089
2645
  // Export singleton instance
5090
2646
  const parallaxService = new ParallaxService();
5091
2647
 
5092
- exports.AddSpanErrorRequest = parallax_gateway_pbExports.AddSpanErrorRequest;
5093
- exports.AddSpanErrorResponse = parallax_gateway_pbExports.AddSpanErrorResponse;
5094
- exports.AddSpanEventRequest = parallax_gateway_pbExports.AddSpanEventRequest;
5095
- exports.AddSpanEventResponse = parallax_gateway_pbExports.AddSpanEventResponse;
5096
- exports.AddSpanHintRequest = parallax_gateway_pbExports.AddSpanHintRequest;
5097
- exports.AddSpanHintResponse = parallax_gateway_pbExports.AddSpanHintResponse;
5098
2648
  exports.CreateTraceRequest = parallax_gateway_pbExports.CreateTraceRequest;
5099
2649
  exports.CreateTraceResponse = parallax_gateway_pbExports.CreateTraceResponse;
5100
- exports.FinishSpanRequest = parallax_gateway_pbExports.FinishSpanRequest;
5101
- exports.FinishSpanResponse = parallax_gateway_pbExports.FinishSpanResponse;
5102
2650
  exports.GrpcWebRpc = GrpcWebRpc;
5103
2651
  exports.ParallaxClient = ParallaxClient;
5104
2652
  exports.ParallaxService = ParallaxService;
5105
- exports.StartSpanRequest = parallax_gateway_pbExports.StartSpanRequest;
5106
- exports.StartSpanResponse = parallax_gateway_pbExports.StartSpanResponse;
2653
+ exports.ParallaxTrace = ParallaxTrace;
5107
2654
  exports.parallaxService = parallaxService;
5108
2655
 
5109
2656
  }));