@fintekkers/ledger-models 0.1.73 → 0.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/node/fintekkers/models/util/api/api_key_grpc_pb.js +1 -0
  2. package/node/fintekkers/models/util/api/api_key_pb.d.ts +36 -0
  3. package/node/fintekkers/models/util/api/api_key_pb.js +266 -0
  4. package/node/wrappers/models/position/position.js +21 -14
  5. package/node/wrappers/models/position/position.js.map +1 -1
  6. package/node/wrappers/models/position/position.test.js +79 -10
  7. package/node/wrappers/models/position/position.test.js.map +1 -1
  8. package/node/wrappers/models/position/position.test.ts +86 -10
  9. package/node/wrappers/models/position/position.ts +26 -27
  10. package/node/wrappers/models/utils/datetime.js +0 -19
  11. package/node/wrappers/models/utils/datetime.js.map +1 -1
  12. package/node/wrappers/models/utils/datetime.test.js +48 -0
  13. package/node/wrappers/models/utils/datetime.test.js.map +1 -0
  14. package/node/wrappers/models/utils/datetime.test.ts +8 -0
  15. package/node/wrappers/models/utils/datetime.ts +0 -24
  16. package/node/wrappers/models/utils/protoEnum.js +5 -1
  17. package/node/wrappers/models/utils/protoEnum.js.map +1 -1
  18. package/node/wrappers/models/utils/protoEnum.test.js +4 -0
  19. package/node/wrappers/models/utils/protoEnum.test.js.map +1 -1
  20. package/node/wrappers/models/utils/protoEnum.test.ts +5 -0
  21. package/node/wrappers/models/utils/protoEnum.ts +7 -2
  22. package/node/wrappers/models/utils/serialization.js.map +1 -1
  23. package/node/wrappers/models/utils/serialization.ts +2 -7
  24. package/node/wrappers/requests/position/QueryPositionRequest.js +44 -0
  25. package/node/wrappers/requests/position/QueryPositionRequest.js.map +1 -0
  26. package/node/wrappers/requests/position/QueryPositionRequest.ts +64 -0
  27. package/node/wrappers/services/portfolio-service/portfolio.test.js +1 -1
  28. package/node/wrappers/services/portfolio-service/portfolio.test.js.map +1 -1
  29. package/node/wrappers/services/portfolio-service/portfolio.test.ts +1 -1
  30. package/node/wrappers/services/position-service/PositionService.js +3 -2
  31. package/node/wrappers/services/position-service/PositionService.js.map +1 -1
  32. package/node/wrappers/services/position-service/PositionService.ts +3 -1
  33. package/node/wrappers/services/position-service/position.test.js +2 -9
  34. package/node/wrappers/services/position-service/position.test.js.map +1 -1
  35. package/node/wrappers/services/position-service/position.test.ts +2 -10
  36. package/package.json +1 -1
  37. package/tsconfig.json +27 -25
  38. package/web/fintekkers/models/util/api/api_key_pb.d.ts +34 -0
  39. package/web/fintekkers/models/util/api/api_key_pb.js +260 -0
@@ -47,7 +47,7 @@ var PositionService = /** @class */ (function () {
47
47
  function PositionService() {
48
48
  this.client = new position_service_grpc_pb_1.PositionClient(requestcontext_1.default.apiURL, requestcontext_1.default.apiCredentials);
49
49
  }
50
- PositionService.prototype.search = function (request) {
50
+ PositionService.prototype.search = function (positionRequest) {
51
51
  return __awaiter(this, void 0, void 0, function () {
52
52
  function processStreamSynchronously() {
53
53
  return __awaiter(this, void 0, void 0, function () {
@@ -71,12 +71,13 @@ var PositionService = /** @class */ (function () {
71
71
  });
72
72
  });
73
73
  }
74
- var tmpClient, listPositions;
74
+ var tmpClient, listPositions, request;
75
75
  return __generator(this, function (_a) {
76
76
  switch (_a.label) {
77
77
  case 0:
78
78
  tmpClient = this.client;
79
79
  listPositions = [];
80
+ request = positionRequest.toProto();
80
81
  return [4 /*yield*/, processStreamSynchronously()];
81
82
  case 1: return [2 /*return*/, _a.sent()];
82
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PositionService.js","sourceRoot":"","sources":["PositionService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,2DAA0D;AAM1D,sBAAsB;AACtB,mHAAwG;AAExG,OAAO;AACP,oEAA0D;AAE1D;IAGE;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,yCAAc,CAAC,wBAAS,CAAC,MAAM,EAAE,wBAAS,CAAC,cAAc,CAAC,CAAC;IAC/E,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AAC,MAAM,EAAE,wBAAS,CAAC,cAAc,CAAC,CAAC;IAC/E,CAAC;IAEK,gCAAM,GAAZ,UAAa,eAAqC;;YAKhD,SAAe,0BAA0B;;;;wBACjC,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;wBAE1C,sBAAO,IAAI,OAAO,CAAa,UAAC,OAAO,EAAE,MAAM;gCAC7C,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,UAAC,QAAoC;oCACtD,QAAQ,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,QAAQ;wCAC3C,aAAa,CAAC,IAAI,CAAC,IAAI,mBAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;oCAC7C,CAAC,CAAC,CAAC;gCACL,CAAC,CAAC,CAAC;gCAEH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;oCAChB,OAAO,CAAC,aAAa,CAAC,CAAC;gCACzB,CAAC,CAAC,CAAC;gCAEH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,GAAG;oCACtB,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;oCAC3C,MAAM,CAAC,GAAG,CAAC,CAAC;gCACd,CAAC,CAAC,CAAC;4BACL,CAAC,CAAC,EAAC;;;aACJ;;;;;wBAvBK,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC;wBACxB,aAAa,GAAe,EAAE,CAAC;wBAC/B,OAAO,GAA8B,eAAe,CAAC,OAAO,EAAE,CAAC;wBAuB9D,qBAAM,0BAA0B,EAAE,EAAA;4BAAzC,sBAAO,SAAkC,EAAC;;;;KAC3C;IACH,sBAAC;AAAD,CAAC,AAnCD,IAmCC;AAEQ,0CAAe"}
@@ -10,6 +10,7 @@ import { PositionClient } from '../../../fintekkers/services/position-service/po
10
10
 
11
11
  //Utils
12
12
  import EnvConfig from '../../models/utils/requestcontext';
13
+ import { QueryPositionRequest } from '../../requests/position/QueryPositionRequest';
13
14
 
14
15
  class PositionService {
15
16
  private client: PositionClient;
@@ -18,9 +19,10 @@ class PositionService {
18
19
  this.client = new PositionClient(EnvConfig.apiURL, EnvConfig.apiCredentials);
19
20
  }
20
21
 
21
- async search(request: QueryPositionRequestProto): Promise<Position[]> {
22
+ async search(positionRequest: QueryPositionRequest): Promise<Position[]> {
22
23
  const tmpClient = this.client;
23
24
  const listPositions: Position[] = [];
25
+ const request: QueryPositionRequestProto = positionRequest.toProto();
24
26
 
25
27
  async function processStreamSynchronously(): Promise<Position[]> {
26
28
  const stream2 = tmpClient.search(request);
@@ -37,14 +37,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  // Models
40
- var position_pb_1 = require("../../../fintekkers/models/position/position_pb");
41
40
  var measure_pb_1 = require("../../../fintekkers/models/position/measure_pb");
42
41
  // Model Utils
43
42
  var field_pb_1 = require("../../../fintekkers/models/position/field_pb");
44
- var datetime_1 = require("../../models/utils/datetime");
45
43
  //Requests & Services
46
44
  var PositionService_1 = require("../../services/position-service/PositionService");
47
- var query_position_request_pb_1 = require("../../../fintekkers/requests/position/query_position_request_pb");
45
+ var QueryPositionRequest_1 = require("../../requests/position/QueryPositionRequest");
48
46
  test('test getting a position against the api.fintekkers.org position service', function () { return __awaiter(void 0, void 0, void 0, function () {
49
47
  var isTrue;
50
48
  return __generator(this, function (_a) {
@@ -65,12 +63,7 @@ function testPosition() {
65
63
  case 0:
66
64
  fields = [field_pb_1.FieldProto.SECURITY_ID, field_pb_1.FieldProto.TRADE_DATE, field_pb_1.FieldProto.PRODUCT_TYPE, field_pb_1.FieldProto.PORTFOLIO, field_pb_1.FieldProto.PRODUCT_TYPE];
67
65
  measures = [measure_pb_1.MeasureProto.DIRECTED_QUANTITY];
68
- request = new query_position_request_pb_1.QueryPositionRequestProto()
69
- .setAsOf(datetime_1.ZonedDateTime.now().toProto())
70
- .setFieldsList(fields)
71
- .setMeasuresList(measures)
72
- .setPositionType(position_pb_1.PositionTypeProto.TRANSACTION)
73
- .setPositionView(position_pb_1.PositionViewProto.DEFAULT_VIEW);
66
+ request = QueryPositionRequest_1.QueryPositionRequest.from(fields, measures);
74
67
  return [4 /*yield*/, new PositionService_1.PositionService().search(request)];
75
68
  case 1:
76
69
  positions = _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"position.test.js","sourceRoot":"","sources":["position.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,+EAAuG;AACvG,6EAA8E;AAE9E,cAAc;AACd,yEAA0E;AAC1E,wDAA4D;AAE5D,qBAAqB;AACrB,mFAAkF;AAClF,6GAA4G;AAE5G,IAAI,CAAC,yEAAyE,EAAE;;;;oBAC/D,qBAAM,YAAY,EAAE,EAAA;;gBAA7B,MAAM,GAAG,SAAoB;gBACnC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;KAC3B,EAAE,KAAK,CAAC,CAAC;AAEV,SAAe,YAAY;;;;;;oBAErB,MAAM,GAAG,CAAC,qBAAU,CAAC,WAAW,EAAE,qBAAU,CAAC,UAAU,EAAE,qBAAU,CAAC,YAAY,EAAE,qBAAU,CAAC,SAAS,EAAE,qBAAU,CAAC,YAAY,CAAC,CAAC;oBACjI,QAAQ,GAAG,CAAC,yBAAY,CAAC,iBAAiB,CAAC,CAAC;oBAE5C,OAAO,GAAG,IAAI,qDAAyB,EAAE;yBAC1C,OAAO,CAAC,wBAAa,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;yBACtC,aAAa,CAAC,MAAM,CAAC;yBACrB,eAAe,CAAC,QAAQ,CAAC;yBACzB,eAAe,CAAC,+BAAiB,CAAC,WAAW,CAAC;yBAC9C,eAAe,CAAC,+BAAiB,CAAC,YAAY,CAAC,CAAC;oBAEnC,qBAAM,IAAI,iCAAe,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,E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,EAAA;;oBAAvD,SAAS,GAAG,SAA2C;oBAE3D,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACtC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,qBAAqB,CAAC,CAAA;wBAEjD,aAAW,SAAS,CAAC,CAAC,CAAC,CAAC;wBAE5B,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK;4BAClB,UAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;wBAChC,CAAC,CAAC,CAAA;wBACF,sBAAO,IAAI,EAAA;oBACb,CAAC;yBAAM,CAAC;wBACN,sBAAO,KAAK,EAAC;oBACf,CAAC;;;;;CACF"}
@@ -1,14 +1,12 @@
1
1
  // Models
2
- import { PositionTypeProto, PositionViewProto } from '../../../fintekkers/models/position/position_pb';
3
2
  import { MeasureProto } from '../../../fintekkers/models/position/measure_pb';
4
3
 
5
4
  // Model Utils
6
5
  import { FieldProto } from '../../../fintekkers/models/position/field_pb';
7
- import { ZonedDateTime } from '../../models/utils/datetime';
8
6
 
9
7
  //Requests & Services
10
8
  import { PositionService } from '../../services/position-service/PositionService';
11
- import { QueryPositionRequestProto } from '../../../fintekkers/requests/position/query_position_request_pb';
9
+ import { QueryPositionRequest } from '../../requests/position/QueryPositionRequest';
12
10
 
13
11
  test('test getting a position against the api.fintekkers.org position service', async () => {
14
12
  const isTrue = await testPosition();
@@ -20,13 +18,7 @@ async function testPosition(): Promise<boolean> {
20
18
  let fields = [FieldProto.SECURITY_ID, FieldProto.TRADE_DATE, FieldProto.PRODUCT_TYPE, FieldProto.PORTFOLIO, FieldProto.PRODUCT_TYPE];
21
19
  let measures = [MeasureProto.DIRECTED_QUANTITY];
22
20
 
23
- let request = new QueryPositionRequestProto()
24
- .setAsOf(ZonedDateTime.now().toProto())
25
- .setFieldsList(fields)
26
- .setMeasuresList(measures)
27
- .setPositionType(PositionTypeProto.TRANSACTION)
28
- .setPositionView(PositionViewProto.DEFAULT_VIEW);
29
-
21
+ let request: QueryPositionRequest = QueryPositionRequest.from(fields, measures);
30
22
  let positions = await new PositionService().search(request);
31
23
 
32
24
  if (positions && positions.length > 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fintekkers/ledger-models",
3
3
  "todo": "Replace the version with build script version number",
4
- "version": "0.1.73",
4
+ "version": "0.1.76",
5
5
  "description": "ledger model protos ",
6
6
  "authors": [
7
7
  "David Doherty",
package/tsconfig.json CHANGED
@@ -1,27 +1,29 @@
1
1
  {
2
- "compileOnSave": true,
3
- "compilerOptions": {
4
- "target": "es5",
5
- "module": "commonjs",
6
- "sourceMap": true //Required for debugging .ts files
7
- }
2
+ "compileOnSave": true,
3
+ "compilerOptions": {
4
+ "target": "es5",
5
+ "module": "commonjs",
6
+ "sourceMap": true, //Required for debugging .ts files
7
+ "typeRoots": [
8
+ "node_modules/@types"
9
+ ],
8
10
  }
9
-
10
- // {
11
- // "compilerOptions": {
12
- // "outDir": "./dist/out-tsc",
13
- // "sourceMap": true,
14
- // "declaration": false,
15
- // "moduleResolution": "node",
16
- // "emitDecoratorMetadata": true,
17
- // "experimentalDecorators": true,
18
- // "target": "es5",
19
- // "typeRoots": [
20
- // "node_modules/@types"
21
- // ],
22
- // "lib": [
23
- // "es2017",
24
- // "dom"
25
- // ]
26
- // }
27
- // }
11
+ }
12
+ // {
13
+ // "compilerOptions": {
14
+ // "outDir": "./dist/out-tsc",
15
+ // "sourceMap": true,
16
+ // "declaration": false,
17
+ // "moduleResolution": "node",
18
+ // "emitDecoratorMetadata": true,
19
+ // "experimentalDecorators": true,
20
+ // "target": "es5",
21
+ // "typeRoots": [
22
+ // "node_modules/@types"
23
+ // ],
24
+ // "lib": [
25
+ // "es2017",
26
+ // "dom"
27
+ // ]
28
+ // }
29
+ // }
@@ -0,0 +1,34 @@
1
+ import * as jspb from 'google-protobuf'
2
+
3
+
4
+
5
+ export class API_Key extends jspb.Message {
6
+ getObjectClass(): string;
7
+ setObjectClass(value: string): API_Key;
8
+
9
+ getVersion(): string;
10
+ setVersion(value: string): API_Key;
11
+
12
+ getIdentity(): string;
13
+ setIdentity(value: string): API_Key;
14
+
15
+ getKey(): string;
16
+ setKey(value: string): API_Key;
17
+
18
+ serializeBinary(): Uint8Array;
19
+ toObject(includeInstance?: boolean): API_Key.AsObject;
20
+ static toObject(includeInstance: boolean, msg: API_Key): API_Key.AsObject;
21
+ static serializeBinaryToWriter(message: API_Key, writer: jspb.BinaryWriter): void;
22
+ static deserializeBinary(bytes: Uint8Array): API_Key;
23
+ static deserializeBinaryFromReader(message: API_Key, reader: jspb.BinaryReader): API_Key;
24
+ }
25
+
26
+ export namespace API_Key {
27
+ export type AsObject = {
28
+ objectClass: string,
29
+ version: string,
30
+ identity: string,
31
+ key: string,
32
+ }
33
+ }
34
+
@@ -0,0 +1,260 @@
1
+ // source: fintekkers/models/util/api/api_key.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ goog.exportSymbol('proto.fintekkers.models.util.api.API_Key', null, global);
19
+ /**
20
+ * Generated by JsPbCodeGenerator.
21
+ * @param {Array=} opt_data Optional initial data array, typically from a
22
+ * server response, or constructed directly in Javascript. The array is used
23
+ * in place and becomes part of the constructed object. It is not cloned.
24
+ * If no data is provided, the constructed object will be empty, but still
25
+ * valid.
26
+ * @extends {jspb.Message}
27
+ * @constructor
28
+ */
29
+ proto.fintekkers.models.util.api.API_Key = function(opt_data) {
30
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
31
+ };
32
+ goog.inherits(proto.fintekkers.models.util.api.API_Key, jspb.Message);
33
+ if (goog.DEBUG && !COMPILED) {
34
+ /**
35
+ * @public
36
+ * @override
37
+ */
38
+ proto.fintekkers.models.util.api.API_Key.displayName = 'proto.fintekkers.models.util.api.API_Key';
39
+ }
40
+
41
+
42
+
43
+ if (jspb.Message.GENERATE_TO_OBJECT) {
44
+ /**
45
+ * Creates an object representation of this proto.
46
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
47
+ * Optional fields that are not set will be set to undefined.
48
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
49
+ * For the list of reserved names please see:
50
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
51
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
52
+ * JSPB instance for transitional soy proto support:
53
+ * http://goto/soy-param-migration
54
+ * @return {!Object}
55
+ */
56
+ proto.fintekkers.models.util.api.API_Key.prototype.toObject = function(opt_includeInstance) {
57
+ return proto.fintekkers.models.util.api.API_Key.toObject(opt_includeInstance, this);
58
+ };
59
+
60
+
61
+ /**
62
+ * Static version of the {@see toObject} method.
63
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
64
+ * the JSPB instance for transitional soy proto support:
65
+ * http://goto/soy-param-migration
66
+ * @param {!proto.fintekkers.models.util.api.API_Key} msg The msg instance to transform.
67
+ * @return {!Object}
68
+ * @suppress {unusedLocalVariables} f is only used for nested messages
69
+ */
70
+ proto.fintekkers.models.util.api.API_Key.toObject = function(includeInstance, msg) {
71
+ var f, obj = {
72
+ objectClass: jspb.Message.getFieldWithDefault(msg, 1, ""),
73
+ version: jspb.Message.getFieldWithDefault(msg, 2, ""),
74
+ identity: jspb.Message.getFieldWithDefault(msg, 3, ""),
75
+ key: jspb.Message.getFieldWithDefault(msg, 4, "")
76
+ };
77
+
78
+ if (includeInstance) {
79
+ obj.$jspbMessageInstance = msg;
80
+ }
81
+ return obj;
82
+ };
83
+ }
84
+
85
+
86
+ /**
87
+ * Deserializes binary data (in protobuf wire format).
88
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
89
+ * @return {!proto.fintekkers.models.util.api.API_Key}
90
+ */
91
+ proto.fintekkers.models.util.api.API_Key.deserializeBinary = function(bytes) {
92
+ var reader = new jspb.BinaryReader(bytes);
93
+ var msg = new proto.fintekkers.models.util.api.API_Key;
94
+ return proto.fintekkers.models.util.api.API_Key.deserializeBinaryFromReader(msg, reader);
95
+ };
96
+
97
+
98
+ /**
99
+ * Deserializes binary data (in protobuf wire format) from the
100
+ * given reader into the given message object.
101
+ * @param {!proto.fintekkers.models.util.api.API_Key} msg The message object to deserialize into.
102
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
103
+ * @return {!proto.fintekkers.models.util.api.API_Key}
104
+ */
105
+ proto.fintekkers.models.util.api.API_Key.deserializeBinaryFromReader = function(msg, reader) {
106
+ while (reader.nextField()) {
107
+ if (reader.isEndGroup()) {
108
+ break;
109
+ }
110
+ var field = reader.getFieldNumber();
111
+ switch (field) {
112
+ case 1:
113
+ var value = /** @type {string} */ (reader.readString());
114
+ msg.setObjectClass(value);
115
+ break;
116
+ case 2:
117
+ var value = /** @type {string} */ (reader.readString());
118
+ msg.setVersion(value);
119
+ break;
120
+ case 3:
121
+ var value = /** @type {string} */ (reader.readString());
122
+ msg.setIdentity(value);
123
+ break;
124
+ case 4:
125
+ var value = /** @type {string} */ (reader.readString());
126
+ msg.setKey(value);
127
+ break;
128
+ default:
129
+ reader.skipField();
130
+ break;
131
+ }
132
+ }
133
+ return msg;
134
+ };
135
+
136
+
137
+ /**
138
+ * Serializes the message to binary data (in protobuf wire format).
139
+ * @return {!Uint8Array}
140
+ */
141
+ proto.fintekkers.models.util.api.API_Key.prototype.serializeBinary = function() {
142
+ var writer = new jspb.BinaryWriter();
143
+ proto.fintekkers.models.util.api.API_Key.serializeBinaryToWriter(this, writer);
144
+ return writer.getResultBuffer();
145
+ };
146
+
147
+
148
+ /**
149
+ * Serializes the given message to binary data (in protobuf wire
150
+ * format), writing to the given BinaryWriter.
151
+ * @param {!proto.fintekkers.models.util.api.API_Key} message
152
+ * @param {!jspb.BinaryWriter} writer
153
+ * @suppress {unusedLocalVariables} f is only used for nested messages
154
+ */
155
+ proto.fintekkers.models.util.api.API_Key.serializeBinaryToWriter = function(message, writer) {
156
+ var f = undefined;
157
+ f = message.getObjectClass();
158
+ if (f.length > 0) {
159
+ writer.writeString(
160
+ 1,
161
+ f
162
+ );
163
+ }
164
+ f = message.getVersion();
165
+ if (f.length > 0) {
166
+ writer.writeString(
167
+ 2,
168
+ f
169
+ );
170
+ }
171
+ f = message.getIdentity();
172
+ if (f.length > 0) {
173
+ writer.writeString(
174
+ 3,
175
+ f
176
+ );
177
+ }
178
+ f = message.getKey();
179
+ if (f.length > 0) {
180
+ writer.writeString(
181
+ 4,
182
+ f
183
+ );
184
+ }
185
+ };
186
+
187
+
188
+ /**
189
+ * optional string object_class = 1;
190
+ * @return {string}
191
+ */
192
+ proto.fintekkers.models.util.api.API_Key.prototype.getObjectClass = function() {
193
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
194
+ };
195
+
196
+
197
+ /**
198
+ * @param {string} value
199
+ * @return {!proto.fintekkers.models.util.api.API_Key} returns this
200
+ */
201
+ proto.fintekkers.models.util.api.API_Key.prototype.setObjectClass = function(value) {
202
+ return jspb.Message.setProto3StringField(this, 1, value);
203
+ };
204
+
205
+
206
+ /**
207
+ * optional string version = 2;
208
+ * @return {string}
209
+ */
210
+ proto.fintekkers.models.util.api.API_Key.prototype.getVersion = function() {
211
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
212
+ };
213
+
214
+
215
+ /**
216
+ * @param {string} value
217
+ * @return {!proto.fintekkers.models.util.api.API_Key} returns this
218
+ */
219
+ proto.fintekkers.models.util.api.API_Key.prototype.setVersion = function(value) {
220
+ return jspb.Message.setProto3StringField(this, 2, value);
221
+ };
222
+
223
+
224
+ /**
225
+ * optional string identity = 3;
226
+ * @return {string}
227
+ */
228
+ proto.fintekkers.models.util.api.API_Key.prototype.getIdentity = function() {
229
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
230
+ };
231
+
232
+
233
+ /**
234
+ * @param {string} value
235
+ * @return {!proto.fintekkers.models.util.api.API_Key} returns this
236
+ */
237
+ proto.fintekkers.models.util.api.API_Key.prototype.setIdentity = function(value) {
238
+ return jspb.Message.setProto3StringField(this, 3, value);
239
+ };
240
+
241
+
242
+ /**
243
+ * optional string key = 4;
244
+ * @return {string}
245
+ */
246
+ proto.fintekkers.models.util.api.API_Key.prototype.getKey = function() {
247
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
248
+ };
249
+
250
+
251
+ /**
252
+ * @param {string} value
253
+ * @return {!proto.fintekkers.models.util.api.API_Key} returns this
254
+ */
255
+ proto.fintekkers.models.util.api.API_Key.prototype.setKey = function(value) {
256
+ return jspb.Message.setProto3StringField(this, 4, value);
257
+ };
258
+
259
+
260
+ goog.object.extend(exports, proto.fintekkers.models.util.api);