gs2 1.4.34 → 1.4.35

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.
@@ -0,0 +1,17 @@
1
+ import IModel from '../../core/interface/IModel';
2
+ export default class LogRate implements IModel {
3
+ private base;
4
+ private logs;
5
+ getBase(): number | null;
6
+ setBase(base: number | null): this;
7
+ withBase(base: number | null): this;
8
+ getLogs(): number[] | null;
9
+ setLogs(logs: number[] | null): this;
10
+ withLogs(logs: number[] | null): this;
11
+ static fromDict(data: {
12
+ [key: string]: any;
13
+ }): LogRate | null;
14
+ toDict(): {
15
+ [key: string]: any;
16
+ };
17
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /*
3
+ Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
4
+ Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License").
7
+ You may not use this file except in compliance with the License.
8
+ A copy of the License is located at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ or in the "license" file accompanying this file. This file is distributed
13
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
+ express or implied. See the License for the specific language governing
15
+ permissions and limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var LogRate = /** @class */ (function () {
19
+ function LogRate() {
20
+ this.base = null;
21
+ this.logs = null;
22
+ }
23
+ LogRate.prototype.getBase = function () {
24
+ return this.base;
25
+ };
26
+ LogRate.prototype.setBase = function (base) {
27
+ this.base = base;
28
+ return this;
29
+ };
30
+ LogRate.prototype.withBase = function (base) {
31
+ this.base = base;
32
+ return this;
33
+ };
34
+ LogRate.prototype.getLogs = function () {
35
+ return this.logs;
36
+ };
37
+ LogRate.prototype.setLogs = function (logs) {
38
+ this.logs = logs;
39
+ return this;
40
+ };
41
+ LogRate.prototype.withLogs = function (logs) {
42
+ this.logs = logs;
43
+ return this;
44
+ };
45
+ LogRate.fromDict = function (data) {
46
+ if (data == undefined || data == null) {
47
+ return null;
48
+ }
49
+ return new LogRate()
50
+ .withBase(data["base"])
51
+ .withLogs(data.logs ?
52
+ data.logs.map(function (item) {
53
+ return item;
54
+ }) : []);
55
+ };
56
+ LogRate.prototype.toDict = function () {
57
+ return {
58
+ "base": this.getBase(),
59
+ "logs": this.getLogs() ?
60
+ this.getLogs().map(function (item) {
61
+ return item;
62
+ }) : [],
63
+ };
64
+ };
65
+ return LogRate;
66
+ }());
67
+ exports.default = LogRate;
68
+ //# sourceMappingURL=LogRate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogRate.js","sourceRoot":"","sources":["LogRate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH;IAAA;QACY,SAAI,GAAgB,IAAI,CAAC;QACzB,SAAI,GAAkB,IAAI,CAAC;IA+CvC,CAAC;IA9CU,yBAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACM,yBAAO,GAAd,UAAe,IAAiB;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,0BAAQ,GAAf,UAAgB,IAAiB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,yBAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACM,yBAAO,GAAd,UAAe,IAAmB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,0BAAQ,GAAf,UAAgB,IAAmB;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,gBAAQ,GAAtB,UAAuB,IAA0B;QAC7C,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,OAAO,EAAE;aACf,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,IAA0B;gBACrC,OAAO,IAAI,CAAC;YAChB,CAAC,CACJ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAEM,wBAAM,GAAb;QACI,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpB,IAAI,CAAC,OAAO,EAAG,CAAC,GAAG,CAAC,UAAC,IAAY;oBAC7B,OAAO,IAAI,CAAC;gBAChB,CAAC,CACJ,CAAC,CAAC,CAAC,EAAE;SACT,CAAC;IACN,CAAC;IACL,cAAC;AAAD,CAAC,AAjDD,IAiDC"}
@@ -0,0 +1,68 @@
1
+ /*
2
+ Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
3
+ Reserved.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License").
6
+ You may not use this file except in compliance with the License.
7
+ A copy of the License is located at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ or in the "license" file accompanying this file. This file is distributed
12
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ express or implied. See the License for the specific language governing
14
+ permissions and limitations under the License.
15
+ */
16
+
17
+ import IModel from '../../core/interface/IModel';
18
+
19
+ export default class LogRate implements IModel {
20
+ private base: number|null = null;
21
+ private logs: number[]|null = null;
22
+ public getBase(): number|null {
23
+ return this.base;
24
+ }
25
+ public setBase(base: number|null) {
26
+ this.base = base;
27
+ return this;
28
+ }
29
+ public withBase(base: number|null): this {
30
+ this.base = base;
31
+ return this;
32
+ }
33
+ public getLogs(): number[]|null {
34
+ return this.logs;
35
+ }
36
+ public setLogs(logs: number[]|null) {
37
+ this.logs = logs;
38
+ return this;
39
+ }
40
+ public withLogs(logs: number[]|null): this {
41
+ this.logs = logs;
42
+ return this;
43
+ }
44
+
45
+ public static fromDict(data: {[key: string]: any}): LogRate|null {
46
+ if (data == undefined || data == null) {
47
+ return null;
48
+ }
49
+ return new LogRate()
50
+ .withBase(data["base"])
51
+ .withLogs(data.logs ?
52
+ data.logs.map((item: {[key: string]: any}) => {
53
+ return item;
54
+ }
55
+ ) : []);
56
+ }
57
+
58
+ public toDict(): {[key: string]: any} {
59
+ return {
60
+ "base": this.getBase(),
61
+ "logs": this.getLogs() ?
62
+ this.getLogs()!.map((item: number) => {
63
+ return item;
64
+ }
65
+ ) : [],
66
+ };
67
+ }
68
+ }
@@ -6,6 +6,7 @@ import IncrementalRateModelMaster from "./IncrementalRateModelMaster";
6
6
  import CurrentRateMaster from "./CurrentRateMaster";
7
7
  import Await from "./Await";
8
8
  import LogCost from "./LogCost";
9
+ import LogRate from "./LogRate";
9
10
  import AcquireAction from "./AcquireAction";
10
11
  import ConsumeAction from "./ConsumeAction";
11
12
  import VerifyAction from "./VerifyAction";
@@ -14,4 +15,4 @@ import GitHubCheckoutSetting from "./GitHubCheckoutSetting";
14
15
  import ScriptSetting from "./ScriptSetting";
15
16
  import LogSetting from "./LogSetting";
16
17
  import TransactionSetting from "./TransactionSetting";
17
- export { Namespace, RateModel, RateModelMaster, IncrementalRateModel, IncrementalRateModelMaster, CurrentRateMaster, Await, LogCost, AcquireAction, ConsumeAction, VerifyAction, Config, GitHubCheckoutSetting, ScriptSetting, LogSetting, TransactionSetting, };
18
+ export { Namespace, RateModel, RateModelMaster, IncrementalRateModel, IncrementalRateModelMaster, CurrentRateMaster, Await, LogCost, LogRate, AcquireAction, ConsumeAction, VerifyAction, Config, GitHubCheckoutSetting, ScriptSetting, LogSetting, TransactionSetting, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionSetting = exports.LogSetting = exports.ScriptSetting = exports.GitHubCheckoutSetting = exports.Config = exports.VerifyAction = exports.ConsumeAction = exports.AcquireAction = exports.LogCost = exports.Await = exports.CurrentRateMaster = exports.IncrementalRateModelMaster = exports.IncrementalRateModel = exports.RateModelMaster = exports.RateModel = exports.Namespace = void 0;
3
+ exports.TransactionSetting = exports.LogSetting = exports.ScriptSetting = exports.GitHubCheckoutSetting = exports.Config = exports.VerifyAction = exports.ConsumeAction = exports.AcquireAction = exports.LogRate = exports.LogCost = exports.Await = exports.CurrentRateMaster = exports.IncrementalRateModelMaster = exports.IncrementalRateModel = exports.RateModelMaster = exports.RateModel = exports.Namespace = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  /*
6
6
  Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
@@ -33,6 +33,8 @@ var Await_1 = tslib_1.__importDefault(require("./Await"));
33
33
  exports.Await = Await_1.default;
34
34
  var LogCost_1 = tslib_1.__importDefault(require("./LogCost"));
35
35
  exports.LogCost = LogCost_1.default;
36
+ var LogRate_1 = tslib_1.__importDefault(require("./LogRate"));
37
+ exports.LogRate = LogRate_1.default;
36
38
  var AcquireAction_1 = tslib_1.__importDefault(require("./AcquireAction"));
37
39
  exports.AcquireAction = AcquireAction_1.default;
38
40
  var ConsumeAction_1 = tslib_1.__importDefault(require("./ConsumeAction"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,kEAAmC;AAkB/B,oBAlBG,mBAAS,CAkBH;AAjBb,kEAAmC;AAkB/B,oBAlBG,mBAAS,CAkBH;AAjBb,8EAA+C;AAkB3C,0BAlBG,yBAAe,CAkBH;AAjBnB,wFAAyD;AAkBrD,+BAlBG,8BAAoB,CAkBH;AAjBxB,oGAAqE;AAkBjE,qCAlBG,oCAA0B,CAkBH;AAjB9B,kFAAmD;AAkB/C,4BAlBG,2BAAiB,CA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,CAmBH;AAlBzB,0EAA2C;AAmBvC,wBAnBG,uBAAa,CAmBH;AAlBjB,oEAAqC;AAmBjC,qBAnBG,oBAAU,CAmBH;AAlBd,oFAAqD;AAmBjD,6BAnBG,4BAAkB,CAmBH"}
@@ -21,6 +21,7 @@ import IncrementalRateModelMaster from "./IncrementalRateModelMaster"
21
21
  import CurrentRateMaster from "./CurrentRateMaster"
22
22
  import Await from "./Await"
23
23
  import LogCost from "./LogCost"
24
+ import LogRate from "./LogRate"
24
25
  import AcquireAction from "./AcquireAction"
25
26
  import ConsumeAction from "./ConsumeAction"
26
27
  import VerifyAction from "./VerifyAction"
@@ -39,6 +40,7 @@ export {
39
40
  CurrentRateMaster,
40
41
  Await,
41
42
  LogCost,
43
+ LogRate,
42
44
  AcquireAction,
43
45
  ConsumeAction,
44
46
  VerifyAction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gs2",
3
- "version": "1.4.34",
3
+ "version": "1.4.35",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "prepublishOnly": "npm run build"