@marleena/trb-proto 1.0.3 → 1.0.4

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.
@@ -1,4 +1,4 @@
1
- // source: api/data/data.proto
1
+ // source: api/db_api/db_api.proto
2
2
  /**
3
3
  * @fileoverview
4
4
  * @enhanceable
@@ -25,11 +25,11 @@ var google_api_annotations_pb = require('../../google/api/annotations_pb.js');
25
25
  goog.object.extend(proto, google_api_annotations_pb);
26
26
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
27
27
  goog.object.extend(proto, google_protobuf_timestamp_pb);
28
- goog.exportSymbol('proto.trb.db.api.public.contract.v1.Instrument', null, global);
28
+ var tinvest_instruments_pb = require('../../tinvest/instruments_pb.js');
29
+ goog.object.extend(proto, tinvest_instruments_pb);
29
30
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.LastDownload', null, global);
30
31
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.ListFilter', null, global);
31
32
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.ListInstrumentsRequest', null, global);
32
- goog.exportSymbol('proto.trb.db.api.public.contract.v1.ListInstrumentsResponse', null, global);
33
33
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.ListLastDownloadsRequest', null, global);
34
34
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.ListLastDownloadsResponse', null, global);
35
35
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.ListSchedulerTargetsRequest', null, global);
@@ -38,6 +38,7 @@ goog.exportSymbol('proto.trb.db.api.public.contract.v1.SchedulerTarget', null, g
38
38
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.SchedulerTargetInstrument', null, global);
39
39
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.SyncSchedulerTargetsRequest', null, global);
40
40
  goog.exportSymbol('proto.trb.db.api.public.contract.v1.SyncSchedulerTargetsResponse', null, global);
41
+ goog.exportSymbol('proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse', null, global);
41
42
  /**
42
43
  * Generated by JsPbCodeGenerator.
43
44
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -90,37 +91,16 @@ if (goog.DEBUG && !COMPILED) {
90
91
  * @extends {jspb.Message}
91
92
  * @constructor
92
93
  */
93
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse = function(opt_data) {
94
- jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.repeatedFields_, null);
95
- };
96
- goog.inherits(proto.trb.db.api.public.contract.v1.ListInstrumentsResponse, jspb.Message);
97
- if (goog.DEBUG && !COMPILED) {
98
- /**
99
- * @public
100
- * @override
101
- */
102
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.displayName = 'proto.trb.db.api.public.contract.v1.ListInstrumentsResponse';
103
- }
104
- /**
105
- * Generated by JsPbCodeGenerator.
106
- * @param {Array=} opt_data Optional initial data array, typically from a
107
- * server response, or constructed directly in Javascript. The array is used
108
- * in place and becomes part of the constructed object. It is not cloned.
109
- * If no data is provided, the constructed object will be empty, but still
110
- * valid.
111
- * @extends {jspb.Message}
112
- * @constructor
113
- */
114
- proto.trb.db.api.public.contract.v1.Instrument = function(opt_data) {
94
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse = function(opt_data) {
115
95
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
116
96
  };
117
- goog.inherits(proto.trb.db.api.public.contract.v1.Instrument, jspb.Message);
97
+ goog.inherits(proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse, jspb.Message);
118
98
  if (goog.DEBUG && !COMPILED) {
119
99
  /**
120
100
  * @public
121
101
  * @override
122
102
  */
123
- proto.trb.db.api.public.contract.v1.Instrument.displayName = 'proto.trb.db.api.public.contract.v1.Instrument';
103
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.displayName = 'proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse';
124
104
  }
125
105
  /**
126
106
  * Generated by JsPbCodeGenerator.
@@ -683,13 +663,6 @@ proto.trb.db.api.public.contract.v1.ListInstrumentsRequest.prototype.setLite = f
683
663
 
684
664
 
685
665
 
686
- /**
687
- * List of repeated fields within this message type.
688
- * @private {!Array<number>}
689
- * @const
690
- */
691
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.repeatedFields_ = [1];
692
-
693
666
 
694
667
 
695
668
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -705,8 +678,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
705
678
  * http://goto/soy-param-migration
706
679
  * @return {!Object}
707
680
  */
708
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.toObject = function(opt_includeInstance) {
709
- return proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.toObject(opt_includeInstance, this);
681
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.toObject = function(opt_includeInstance) {
682
+ return proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.toObject(opt_includeInstance, this);
710
683
  };
711
684
 
712
685
 
@@ -715,14 +688,16 @@ proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.toObject =
715
688
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
716
689
  * the JSPB instance for transitional soy proto support:
717
690
  * http://goto/soy-param-migration
718
- * @param {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse} msg The msg instance to transform.
691
+ * @param {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} msg The msg instance to transform.
719
692
  * @return {!Object}
720
693
  * @suppress {unusedLocalVariables} f is only used for nested messages
721
694
  */
722
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.toObject = function(includeInstance, msg) {
695
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.toObject = function(includeInstance, msg) {
723
696
  var f, obj = {
724
- itemsList: jspb.Message.toObjectList(msg.getItemsList(),
725
- proto.trb.db.api.public.contract.v1.Instrument.toObject, includeInstance)
697
+ fetched: jspb.Message.getFieldWithDefault(msg, 1, 0),
698
+ inserted: jspb.Message.getFieldWithDefault(msg, 2, 0),
699
+ updated: jspb.Message.getFieldWithDefault(msg, 3, 0),
700
+ unchanged: jspb.Message.getFieldWithDefault(msg, 4, 0)
726
701
  };
727
702
 
728
703
  if (includeInstance) {
@@ -736,23 +711,23 @@ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
736
711
  /**
737
712
  * Deserializes binary data (in protobuf wire format).
738
713
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
739
- * @return {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse}
714
+ * @return {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse}
740
715
  */
741
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.deserializeBinary = function(bytes) {
716
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.deserializeBinary = function(bytes) {
742
717
  var reader = new jspb.BinaryReader(bytes);
743
- var msg = new proto.trb.db.api.public.contract.v1.ListInstrumentsResponse;
744
- return proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.deserializeBinaryFromReader(msg, reader);
718
+ var msg = new proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse;
719
+ return proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.deserializeBinaryFromReader(msg, reader);
745
720
  };
746
721
 
747
722
 
748
723
  /**
749
724
  * Deserializes binary data (in protobuf wire format) from the
750
725
  * given reader into the given message object.
751
- * @param {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse} msg The message object to deserialize into.
726
+ * @param {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} msg The message object to deserialize into.
752
727
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
753
- * @return {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse}
728
+ * @return {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse}
754
729
  */
755
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.deserializeBinaryFromReader = function(msg, reader) {
730
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.deserializeBinaryFromReader = function(msg, reader) {
756
731
  while (reader.nextField()) {
757
732
  if (reader.isEndGroup()) {
758
733
  break;
@@ -760,247 +735,20 @@ proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.deserializeBinaryFro
760
735
  var field = reader.getFieldNumber();
761
736
  switch (field) {
762
737
  case 1:
763
- var value = new proto.trb.db.api.public.contract.v1.Instrument;
764
- reader.readMessage(value,proto.trb.db.api.public.contract.v1.Instrument.deserializeBinaryFromReader);
765
- msg.addItems(value);
766
- break;
767
- default:
768
- reader.skipField();
769
- break;
770
- }
771
- }
772
- return msg;
773
- };
774
-
775
-
776
- /**
777
- * Serializes the message to binary data (in protobuf wire format).
778
- * @return {!Uint8Array}
779
- */
780
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.serializeBinary = function() {
781
- var writer = new jspb.BinaryWriter();
782
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.serializeBinaryToWriter(this, writer);
783
- return writer.getResultBuffer();
784
- };
785
-
786
-
787
- /**
788
- * Serializes the given message to binary data (in protobuf wire
789
- * format), writing to the given BinaryWriter.
790
- * @param {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse} message
791
- * @param {!jspb.BinaryWriter} writer
792
- * @suppress {unusedLocalVariables} f is only used for nested messages
793
- */
794
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.serializeBinaryToWriter = function(message, writer) {
795
- var f = undefined;
796
- f = message.getItemsList();
797
- if (f.length > 0) {
798
- writer.writeRepeatedMessage(
799
- 1,
800
- f,
801
- proto.trb.db.api.public.contract.v1.Instrument.serializeBinaryToWriter
802
- );
803
- }
804
- };
805
-
806
-
807
- /**
808
- * repeated Instrument items = 1;
809
- * @return {!Array<!proto.trb.db.api.public.contract.v1.Instrument>}
810
- */
811
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.getItemsList = function() {
812
- return /** @type{!Array<!proto.trb.db.api.public.contract.v1.Instrument>} */ (
813
- jspb.Message.getRepeatedWrapperField(this, proto.trb.db.api.public.contract.v1.Instrument, 1));
814
- };
815
-
816
-
817
- /**
818
- * @param {!Array<!proto.trb.db.api.public.contract.v1.Instrument>} value
819
- * @return {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse} returns this
820
- */
821
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.setItemsList = function(value) {
822
- return jspb.Message.setRepeatedWrapperField(this, 1, value);
823
- };
824
-
825
-
826
- /**
827
- * @param {!proto.trb.db.api.public.contract.v1.Instrument=} opt_value
828
- * @param {number=} opt_index
829
- * @return {!proto.trb.db.api.public.contract.v1.Instrument}
830
- */
831
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.addItems = function(opt_value, opt_index) {
832
- return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.db.api.public.contract.v1.Instrument, opt_index);
833
- };
834
-
835
-
836
- /**
837
- * Clears the list making it empty but non-null.
838
- * @return {!proto.trb.db.api.public.contract.v1.ListInstrumentsResponse} returns this
839
- */
840
- proto.trb.db.api.public.contract.v1.ListInstrumentsResponse.prototype.clearItemsList = function() {
841
- return this.setItemsList([]);
842
- };
843
-
844
-
845
-
846
-
847
-
848
- if (jspb.Message.GENERATE_TO_OBJECT) {
849
- /**
850
- * Creates an object representation of this proto.
851
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
852
- * Optional fields that are not set will be set to undefined.
853
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
854
- * For the list of reserved names please see:
855
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
856
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
857
- * JSPB instance for transitional soy proto support:
858
- * http://goto/soy-param-migration
859
- * @return {!Object}
860
- */
861
- proto.trb.db.api.public.contract.v1.Instrument.prototype.toObject = function(opt_includeInstance) {
862
- return proto.trb.db.api.public.contract.v1.Instrument.toObject(opt_includeInstance, this);
863
- };
864
-
865
-
866
- /**
867
- * Static version of the {@see toObject} method.
868
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
869
- * the JSPB instance for transitional soy proto support:
870
- * http://goto/soy-param-migration
871
- * @param {!proto.trb.db.api.public.contract.v1.Instrument} msg The msg instance to transform.
872
- * @return {!Object}
873
- * @suppress {unusedLocalVariables} f is only used for nested messages
874
- */
875
- proto.trb.db.api.public.contract.v1.Instrument.toObject = function(includeInstance, msg) {
876
- var f, obj = {
877
- uid: jspb.Message.getFieldWithDefault(msg, 1, ""),
878
- figi: jspb.Message.getFieldWithDefault(msg, 2, ""),
879
- ticker: jspb.Message.getFieldWithDefault(msg, 3, ""),
880
- name: jspb.Message.getFieldWithDefault(msg, 4, ""),
881
- classCode: jspb.Message.getFieldWithDefault(msg, 5, ""),
882
- isin: jspb.Message.getFieldWithDefault(msg, 6, ""),
883
- lot: jspb.Message.getFieldWithDefault(msg, 7, 0),
884
- currency: jspb.Message.getFieldWithDefault(msg, 8, ""),
885
- exchange: jspb.Message.getFieldWithDefault(msg, 9, ""),
886
- sector: jspb.Message.getFieldWithDefault(msg, 10, ""),
887
- tradingStatus: jspb.Message.getFieldWithDefault(msg, 11, 0),
888
- liquidityFlag: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),
889
- shortEnabledFlag: jspb.Message.getBooleanFieldWithDefault(msg, 13, false),
890
- apiTradeAvailableFlag: jspb.Message.getBooleanFieldWithDefault(msg, 14, false),
891
- buyAvailableFlag: jspb.Message.getBooleanFieldWithDefault(msg, 15, false),
892
- sellAvailableFlag: jspb.Message.getBooleanFieldWithDefault(msg, 16, false),
893
- first1minCandleDate: (f = msg.getFirst1minCandleDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
894
- first1dayCandleDate: (f = msg.getFirst1dayCandleDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
895
- };
896
-
897
- if (includeInstance) {
898
- obj.$jspbMessageInstance = msg;
899
- }
900
- return obj;
901
- };
902
- }
903
-
904
-
905
- /**
906
- * Deserializes binary data (in protobuf wire format).
907
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
908
- * @return {!proto.trb.db.api.public.contract.v1.Instrument}
909
- */
910
- proto.trb.db.api.public.contract.v1.Instrument.deserializeBinary = function(bytes) {
911
- var reader = new jspb.BinaryReader(bytes);
912
- var msg = new proto.trb.db.api.public.contract.v1.Instrument;
913
- return proto.trb.db.api.public.contract.v1.Instrument.deserializeBinaryFromReader(msg, reader);
914
- };
915
-
916
-
917
- /**
918
- * Deserializes binary data (in protobuf wire format) from the
919
- * given reader into the given message object.
920
- * @param {!proto.trb.db.api.public.contract.v1.Instrument} msg The message object to deserialize into.
921
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
922
- * @return {!proto.trb.db.api.public.contract.v1.Instrument}
923
- */
924
- proto.trb.db.api.public.contract.v1.Instrument.deserializeBinaryFromReader = function(msg, reader) {
925
- while (reader.nextField()) {
926
- if (reader.isEndGroup()) {
927
- break;
928
- }
929
- var field = reader.getFieldNumber();
930
- switch (field) {
931
- case 1:
932
- var value = /** @type {string} */ (reader.readString());
933
- msg.setUid(value);
738
+ var value = /** @type {number} */ (reader.readInt32());
739
+ msg.setFetched(value);
934
740
  break;
935
741
  case 2:
936
- var value = /** @type {string} */ (reader.readString());
937
- msg.setFigi(value);
742
+ var value = /** @type {number} */ (reader.readInt32());
743
+ msg.setInserted(value);
938
744
  break;
939
745
  case 3:
940
- var value = /** @type {string} */ (reader.readString());
941
- msg.setTicker(value);
942
- break;
943
- case 4:
944
- var value = /** @type {string} */ (reader.readString());
945
- msg.setName(value);
946
- break;
947
- case 5:
948
- var value = /** @type {string} */ (reader.readString());
949
- msg.setClassCode(value);
950
- break;
951
- case 6:
952
- var value = /** @type {string} */ (reader.readString());
953
- msg.setIsin(value);
954
- break;
955
- case 7:
956
746
  var value = /** @type {number} */ (reader.readInt32());
957
- msg.setLot(value);
958
- break;
959
- case 8:
960
- var value = /** @type {string} */ (reader.readString());
961
- msg.setCurrency(value);
962
- break;
963
- case 9:
964
- var value = /** @type {string} */ (reader.readString());
965
- msg.setExchange(value);
747
+ msg.setUpdated(value);
966
748
  break;
967
- case 10:
968
- var value = /** @type {string} */ (reader.readString());
969
- msg.setSector(value);
970
- break;
971
- case 11:
749
+ case 4:
972
750
  var value = /** @type {number} */ (reader.readInt32());
973
- msg.setTradingStatus(value);
974
- break;
975
- case 12:
976
- var value = /** @type {boolean} */ (reader.readBool());
977
- msg.setLiquidityFlag(value);
978
- break;
979
- case 13:
980
- var value = /** @type {boolean} */ (reader.readBool());
981
- msg.setShortEnabledFlag(value);
982
- break;
983
- case 14:
984
- var value = /** @type {boolean} */ (reader.readBool());
985
- msg.setApiTradeAvailableFlag(value);
986
- break;
987
- case 15:
988
- var value = /** @type {boolean} */ (reader.readBool());
989
- msg.setBuyAvailableFlag(value);
990
- break;
991
- case 16:
992
- var value = /** @type {boolean} */ (reader.readBool());
993
- msg.setSellAvailableFlag(value);
994
- break;
995
- case 17:
996
- var value = new google_protobuf_timestamp_pb.Timestamp;
997
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
998
- msg.setFirst1minCandleDate(value);
999
- break;
1000
- case 18:
1001
- var value = new google_protobuf_timestamp_pb.Timestamp;
1002
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1003
- msg.setFirst1dayCandleDate(value);
751
+ msg.setUnchanged(value);
1004
752
  break;
1005
753
  default:
1006
754
  reader.skipField();
@@ -1015,9 +763,9 @@ proto.trb.db.api.public.contract.v1.Instrument.deserializeBinaryFromReader = fun
1015
763
  * Serializes the message to binary data (in protobuf wire format).
1016
764
  * @return {!Uint8Array}
1017
765
  */
1018
- proto.trb.db.api.public.contract.v1.Instrument.prototype.serializeBinary = function() {
766
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.serializeBinary = function() {
1019
767
  var writer = new jspb.BinaryWriter();
1020
- proto.trb.db.api.public.contract.v1.Instrument.serializeBinaryToWriter(this, writer);
768
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.serializeBinaryToWriter(this, writer);
1021
769
  return writer.getResultBuffer();
1022
770
  };
1023
771
 
@@ -1025,502 +773,112 @@ proto.trb.db.api.public.contract.v1.Instrument.prototype.serializeBinary = funct
1025
773
  /**
1026
774
  * Serializes the given message to binary data (in protobuf wire
1027
775
  * format), writing to the given BinaryWriter.
1028
- * @param {!proto.trb.db.api.public.contract.v1.Instrument} message
776
+ * @param {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} message
1029
777
  * @param {!jspb.BinaryWriter} writer
1030
778
  * @suppress {unusedLocalVariables} f is only used for nested messages
1031
779
  */
1032
- proto.trb.db.api.public.contract.v1.Instrument.serializeBinaryToWriter = function(message, writer) {
780
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.serializeBinaryToWriter = function(message, writer) {
1033
781
  var f = undefined;
1034
- f = message.getUid();
1035
- if (f.length > 0) {
1036
- writer.writeString(
782
+ f = message.getFetched();
783
+ if (f !== 0) {
784
+ writer.writeInt32(
1037
785
  1,
1038
786
  f
1039
787
  );
1040
788
  }
1041
- f = message.getFigi();
1042
- if (f.length > 0) {
1043
- writer.writeString(
789
+ f = message.getInserted();
790
+ if (f !== 0) {
791
+ writer.writeInt32(
1044
792
  2,
1045
793
  f
1046
794
  );
1047
795
  }
1048
- f = message.getTicker();
1049
- if (f.length > 0) {
1050
- writer.writeString(
1051
- 3,
1052
- f
1053
- );
1054
- }
1055
- f = message.getName();
1056
- if (f.length > 0) {
1057
- writer.writeString(
1058
- 4,
1059
- f
1060
- );
1061
- }
1062
- f = message.getClassCode();
1063
- if (f.length > 0) {
1064
- writer.writeString(
1065
- 5,
1066
- f
1067
- );
1068
- }
1069
- f = message.getIsin();
1070
- if (f.length > 0) {
1071
- writer.writeString(
1072
- 6,
1073
- f
1074
- );
1075
- }
1076
- f = message.getLot();
796
+ f = message.getUpdated();
1077
797
  if (f !== 0) {
1078
798
  writer.writeInt32(
1079
- 7,
1080
- f
1081
- );
1082
- }
1083
- f = message.getCurrency();
1084
- if (f.length > 0) {
1085
- writer.writeString(
1086
- 8,
1087
- f
1088
- );
1089
- }
1090
- f = message.getExchange();
1091
- if (f.length > 0) {
1092
- writer.writeString(
1093
- 9,
1094
- f
1095
- );
1096
- }
1097
- f = message.getSector();
1098
- if (f.length > 0) {
1099
- writer.writeString(
1100
- 10,
799
+ 3,
1101
800
  f
1102
801
  );
1103
802
  }
1104
- f = message.getTradingStatus();
803
+ f = message.getUnchanged();
1105
804
  if (f !== 0) {
1106
805
  writer.writeInt32(
1107
- 11,
1108
- f
1109
- );
1110
- }
1111
- f = message.getLiquidityFlag();
1112
- if (f) {
1113
- writer.writeBool(
1114
- 12,
1115
- f
1116
- );
1117
- }
1118
- f = message.getShortEnabledFlag();
1119
- if (f) {
1120
- writer.writeBool(
1121
- 13,
1122
- f
1123
- );
1124
- }
1125
- f = message.getApiTradeAvailableFlag();
1126
- if (f) {
1127
- writer.writeBool(
1128
- 14,
1129
- f
1130
- );
1131
- }
1132
- f = message.getBuyAvailableFlag();
1133
- if (f) {
1134
- writer.writeBool(
1135
- 15,
1136
- f
1137
- );
1138
- }
1139
- f = message.getSellAvailableFlag();
1140
- if (f) {
1141
- writer.writeBool(
1142
- 16,
806
+ 4,
1143
807
  f
1144
808
  );
1145
809
  }
1146
- f = message.getFirst1minCandleDate();
1147
- if (f != null) {
1148
- writer.writeMessage(
1149
- 17,
1150
- f,
1151
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1152
- );
1153
- }
1154
- f = message.getFirst1dayCandleDate();
1155
- if (f != null) {
1156
- writer.writeMessage(
1157
- 18,
1158
- f,
1159
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1160
- );
1161
- }
1162
- };
1163
-
1164
-
1165
- /**
1166
- * optional string uid = 1;
1167
- * @return {string}
1168
- */
1169
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getUid = function() {
1170
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1171
- };
1172
-
1173
-
1174
- /**
1175
- * @param {string} value
1176
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1177
- */
1178
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setUid = function(value) {
1179
- return jspb.Message.setProto3StringField(this, 1, value);
1180
- };
1181
-
1182
-
1183
- /**
1184
- * optional string figi = 2;
1185
- * @return {string}
1186
- */
1187
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getFigi = function() {
1188
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1189
- };
1190
-
1191
-
1192
- /**
1193
- * @param {string} value
1194
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1195
- */
1196
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setFigi = function(value) {
1197
- return jspb.Message.setProto3StringField(this, 2, value);
1198
810
  };
1199
811
 
1200
812
 
1201
813
  /**
1202
- * optional string ticker = 3;
1203
- * @return {string}
1204
- */
1205
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getTicker = function() {
1206
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1207
- };
1208
-
1209
-
1210
- /**
1211
- * @param {string} value
1212
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1213
- */
1214
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setTicker = function(value) {
1215
- return jspb.Message.setProto3StringField(this, 3, value);
1216
- };
1217
-
1218
-
1219
- /**
1220
- * optional string name = 4;
1221
- * @return {string}
1222
- */
1223
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getName = function() {
1224
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1225
- };
1226
-
1227
-
1228
- /**
1229
- * @param {string} value
1230
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1231
- */
1232
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setName = function(value) {
1233
- return jspb.Message.setProto3StringField(this, 4, value);
1234
- };
1235
-
1236
-
1237
- /**
1238
- * optional string class_code = 5;
1239
- * @return {string}
1240
- */
1241
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getClassCode = function() {
1242
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1243
- };
1244
-
1245
-
1246
- /**
1247
- * @param {string} value
1248
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1249
- */
1250
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setClassCode = function(value) {
1251
- return jspb.Message.setProto3StringField(this, 5, value);
1252
- };
1253
-
1254
-
1255
- /**
1256
- * optional string isin = 6;
1257
- * @return {string}
1258
- */
1259
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getIsin = function() {
1260
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1261
- };
1262
-
1263
-
1264
- /**
1265
- * @param {string} value
1266
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1267
- */
1268
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setIsin = function(value) {
1269
- return jspb.Message.setProto3StringField(this, 6, value);
1270
- };
1271
-
1272
-
1273
- /**
1274
- * optional int32 lot = 7;
814
+ * optional int32 fetched = 1;
1275
815
  * @return {number}
1276
816
  */
1277
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getLot = function() {
1278
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
817
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.getFetched = function() {
818
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1279
819
  };
1280
820
 
1281
821
 
1282
822
  /**
1283
823
  * @param {number} value
1284
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1285
- */
1286
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setLot = function(value) {
1287
- return jspb.Message.setProto3IntField(this, 7, value);
1288
- };
1289
-
1290
-
1291
- /**
1292
- * optional string currency = 8;
1293
- * @return {string}
1294
- */
1295
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getCurrency = function() {
1296
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
1297
- };
1298
-
1299
-
1300
- /**
1301
- * @param {string} value
1302
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1303
- */
1304
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setCurrency = function(value) {
1305
- return jspb.Message.setProto3StringField(this, 8, value);
1306
- };
1307
-
1308
-
1309
- /**
1310
- * optional string exchange = 9;
1311
- * @return {string}
1312
- */
1313
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getExchange = function() {
1314
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
1315
- };
1316
-
1317
-
1318
- /**
1319
- * @param {string} value
1320
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1321
- */
1322
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setExchange = function(value) {
1323
- return jspb.Message.setProto3StringField(this, 9, value);
1324
- };
1325
-
1326
-
1327
- /**
1328
- * optional string sector = 10;
1329
- * @return {string}
1330
- */
1331
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getSector = function() {
1332
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
1333
- };
1334
-
1335
-
1336
- /**
1337
- * @param {string} value
1338
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
824
+ * @return {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} returns this
1339
825
  */
1340
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setSector = function(value) {
1341
- return jspb.Message.setProto3StringField(this, 10, value);
826
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.setFetched = function(value) {
827
+ return jspb.Message.setProto3IntField(this, 1, value);
1342
828
  };
1343
829
 
1344
830
 
1345
831
  /**
1346
- * optional int32 trading_status = 11;
832
+ * optional int32 inserted = 2;
1347
833
  * @return {number}
1348
834
  */
1349
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getTradingStatus = function() {
1350
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
835
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.getInserted = function() {
836
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1351
837
  };
1352
838
 
1353
839
 
1354
840
  /**
1355
841
  * @param {number} value
1356
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1357
- */
1358
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setTradingStatus = function(value) {
1359
- return jspb.Message.setProto3IntField(this, 11, value);
1360
- };
1361
-
1362
-
1363
- /**
1364
- * optional bool liquidity_flag = 12;
1365
- * @return {boolean}
1366
- */
1367
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getLiquidityFlag = function() {
1368
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));
1369
- };
1370
-
1371
-
1372
- /**
1373
- * @param {boolean} value
1374
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1375
- */
1376
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setLiquidityFlag = function(value) {
1377
- return jspb.Message.setProto3BooleanField(this, 12, value);
1378
- };
1379
-
1380
-
1381
- /**
1382
- * optional bool short_enabled_flag = 13;
1383
- * @return {boolean}
1384
- */
1385
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getShortEnabledFlag = function() {
1386
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false));
1387
- };
1388
-
1389
-
1390
- /**
1391
- * @param {boolean} value
1392
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1393
- */
1394
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setShortEnabledFlag = function(value) {
1395
- return jspb.Message.setProto3BooleanField(this, 13, value);
1396
- };
1397
-
1398
-
1399
- /**
1400
- * optional bool api_trade_available_flag = 14;
1401
- * @return {boolean}
1402
- */
1403
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getApiTradeAvailableFlag = function() {
1404
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false));
1405
- };
1406
-
1407
-
1408
- /**
1409
- * @param {boolean} value
1410
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
842
+ * @return {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} returns this
1411
843
  */
1412
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setApiTradeAvailableFlag = function(value) {
1413
- return jspb.Message.setProto3BooleanField(this, 14, value);
1414
- };
1415
-
1416
-
1417
- /**
1418
- * optional bool buy_available_flag = 15;
1419
- * @return {boolean}
1420
- */
1421
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getBuyAvailableFlag = function() {
1422
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false));
1423
- };
1424
-
1425
-
1426
- /**
1427
- * @param {boolean} value
1428
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1429
- */
1430
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setBuyAvailableFlag = function(value) {
1431
- return jspb.Message.setProto3BooleanField(this, 15, value);
1432
- };
1433
-
1434
-
1435
- /**
1436
- * optional bool sell_available_flag = 16;
1437
- * @return {boolean}
1438
- */
1439
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getSellAvailableFlag = function() {
1440
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false));
1441
- };
1442
-
1443
-
1444
- /**
1445
- * @param {boolean} value
1446
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1447
- */
1448
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setSellAvailableFlag = function(value) {
1449
- return jspb.Message.setProto3BooleanField(this, 16, value);
1450
- };
1451
-
1452
-
1453
- /**
1454
- * optional google.protobuf.Timestamp first_1min_candle_date = 17;
1455
- * @return {?proto.google.protobuf.Timestamp}
1456
- */
1457
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getFirst1minCandleDate = function() {
1458
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1459
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 17));
1460
- };
1461
-
1462
-
1463
- /**
1464
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1465
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1466
- */
1467
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setFirst1minCandleDate = function(value) {
1468
- return jspb.Message.setWrapperField(this, 17, value);
1469
- };
1470
-
1471
-
1472
- /**
1473
- * Clears the message field making it undefined.
1474
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1475
- */
1476
- proto.trb.db.api.public.contract.v1.Instrument.prototype.clearFirst1minCandleDate = function() {
1477
- return this.setFirst1minCandleDate(undefined);
844
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.setInserted = function(value) {
845
+ return jspb.Message.setProto3IntField(this, 2, value);
1478
846
  };
1479
847
 
1480
848
 
1481
849
  /**
1482
- * Returns whether this field is set.
1483
- * @return {boolean}
850
+ * optional int32 updated = 3;
851
+ * @return {number}
1484
852
  */
1485
- proto.trb.db.api.public.contract.v1.Instrument.prototype.hasFirst1minCandleDate = function() {
1486
- return jspb.Message.getField(this, 17) != null;
853
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.getUpdated = function() {
854
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1487
855
  };
1488
856
 
1489
857
 
1490
858
  /**
1491
- * optional google.protobuf.Timestamp first_1day_candle_date = 18;
1492
- * @return {?proto.google.protobuf.Timestamp}
859
+ * @param {number} value
860
+ * @return {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} returns this
1493
861
  */
1494
- proto.trb.db.api.public.contract.v1.Instrument.prototype.getFirst1dayCandleDate = function() {
1495
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1496
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 18));
1497
- };
1498
-
1499
-
1500
- /**
1501
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1502
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
1503
- */
1504
- proto.trb.db.api.public.contract.v1.Instrument.prototype.setFirst1dayCandleDate = function(value) {
1505
- return jspb.Message.setWrapperField(this, 18, value);
862
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.setUpdated = function(value) {
863
+ return jspb.Message.setProto3IntField(this, 3, value);
1506
864
  };
1507
865
 
1508
866
 
1509
867
  /**
1510
- * Clears the message field making it undefined.
1511
- * @return {!proto.trb.db.api.public.contract.v1.Instrument} returns this
868
+ * optional int32 unchanged = 4;
869
+ * @return {number}
1512
870
  */
1513
- proto.trb.db.api.public.contract.v1.Instrument.prototype.clearFirst1dayCandleDate = function() {
1514
- return this.setFirst1dayCandleDate(undefined);
871
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.getUnchanged = function() {
872
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1515
873
  };
1516
874
 
1517
875
 
1518
876
  /**
1519
- * Returns whether this field is set.
1520
- * @return {boolean}
877
+ * @param {number} value
878
+ * @return {!proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse} returns this
1521
879
  */
1522
- proto.trb.db.api.public.contract.v1.Instrument.prototype.hasFirst1dayCandleDate = function() {
1523
- return jspb.Message.getField(this, 18) != null;
880
+ proto.trb.db.api.public.contract.v1.UpsertInstrumentsResponse.prototype.setUnchanged = function(value) {
881
+ return jspb.Message.setProto3IntField(this, 4, value);
1524
882
  };
1525
883
 
1526
884