gs2 1.3.147 → 1.3.148
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/package.json +1 -1
- package/showcase/model/PurchaseCount.d.ts +17 -0
- package/showcase/model/PurchaseCount.js +62 -0
- package/showcase/model/PurchaseCount.js.map +1 -0
- package/showcase/model/PurchaseCount.ts +60 -0
- package/showcase/model/RandomDisplayItem.d.ts +35 -0
- package/showcase/model/RandomDisplayItem.js +133 -0
- package/showcase/model/RandomDisplayItem.js.map +1 -0
- package/showcase/model/RandomDisplayItem.ts +134 -0
- package/showcase/model/RandomDisplayItemModel.d.ts +35 -0
- package/showcase/model/RandomDisplayItemModel.js +133 -0
- package/showcase/model/RandomDisplayItemModel.js.map +1 -0
- package/showcase/model/RandomDisplayItemModel.ts +134 -0
- package/showcase/model/RandomShowcase.d.ts +48 -0
- package/showcase/model/RandomShowcase.js +221 -0
- package/showcase/model/RandomShowcase.js.map +1 -0
- package/showcase/model/RandomShowcase.ts +237 -0
- package/showcase/model/RandomShowcaseMaster.d.ts +60 -0
- package/showcase/model/RandomShowcaseMaster.js +263 -0
- package/showcase/model/RandomShowcaseMaster.js.map +1 -0
- package/showcase/model/RandomShowcaseMaster.ts +279 -0
- package/showcase/model/index.d.ts +6 -1
- package/showcase/model/index.js +11 -1
- package/showcase/model/index.js.map +1 -1
- package/showcase/model/index.ts +10 -0
- package/showcase/request/CreateRandomShowcaseMasterRequest.d.ts +54 -0
- package/showcase/request/CreateRandomShowcaseMasterRequest.js +189 -0
- package/showcase/request/CreateRandomShowcaseMasterRequest.js.map +1 -0
- package/showcase/request/CreateRandomShowcaseMasterRequest.ts +196 -0
- package/showcase/request/DeleteRandomShowcaseMasterRequest.d.ts +25 -0
- package/showcase/request/DeleteRandomShowcaseMasterRequest.js +83 -0
- package/showcase/request/DeleteRandomShowcaseMasterRequest.js.map +1 -0
- package/showcase/request/DeleteRandomShowcaseMasterRequest.ts +90 -0
- package/showcase/request/DescribeRandomShowcaseMastersRequest.d.ts +29 -0
- package/showcase/request/DescribeRandomShowcaseMastersRequest.js +97 -0
- package/showcase/request/DescribeRandomShowcaseMastersRequest.js.map +1 -0
- package/showcase/request/DescribeRandomShowcaseMastersRequest.ts +104 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsByUserIdRequest.d.ts +29 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsByUserIdRequest.js +97 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsByUserIdRequest.js.map +1 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsByUserIdRequest.ts +104 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsRequest.d.ts +29 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsRequest.js +97 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsRequest.js.map +1 -0
- package/showcase/request/DescribeRandomShowcaseSalesItemsRequest.ts +104 -0
- package/showcase/request/GetRandomShowcaseMasterRequest.d.ts +25 -0
- package/showcase/request/GetRandomShowcaseMasterRequest.js +83 -0
- package/showcase/request/GetRandomShowcaseMasterRequest.js.map +1 -0
- package/showcase/request/GetRandomShowcaseMasterRequest.ts +90 -0
- package/showcase/request/IncrementPurchaseCountByStampTaskRequest.d.ts +25 -0
- package/showcase/request/IncrementPurchaseCountByStampTaskRequest.js +83 -0
- package/showcase/request/IncrementPurchaseCountByStampTaskRequest.js.map +1 -0
- package/showcase/request/IncrementPurchaseCountByStampTaskRequest.ts +90 -0
- package/showcase/request/IncrementPurchaseCountByUserIdRequest.d.ts +41 -0
- package/showcase/request/IncrementPurchaseCountByUserIdRequest.js +137 -0
- package/showcase/request/IncrementPurchaseCountByUserIdRequest.js.map +1 -0
- package/showcase/request/IncrementPurchaseCountByUserIdRequest.ts +147 -0
- package/showcase/request/RandomShowcaseBuyByUserIdRequest.d.ts +46 -0
- package/showcase/request/RandomShowcaseBuyByUserIdRequest.js +159 -0
- package/showcase/request/RandomShowcaseBuyByUserIdRequest.js.map +1 -0
- package/showcase/request/RandomShowcaseBuyByUserIdRequest.ts +169 -0
- package/showcase/request/RandomShowcaseBuyRequest.d.ts +46 -0
- package/showcase/request/RandomShowcaseBuyRequest.js +159 -0
- package/showcase/request/RandomShowcaseBuyRequest.js.map +1 -0
- package/showcase/request/RandomShowcaseBuyRequest.ts +169 -0
- package/showcase/request/UpdateRandomShowcaseMasterRequest.d.ts +54 -0
- package/showcase/request/UpdateRandomShowcaseMasterRequest.js +189 -0
- package/showcase/request/UpdateRandomShowcaseMasterRequest.js.map +1 -0
- package/showcase/request/UpdateRandomShowcaseMasterRequest.ts +196 -0
- package/showcase/request/index.d.ts +12 -1
- package/showcase/request/index.js +23 -1
- package/showcase/request/index.js.map +1 -1
- package/showcase/request/index.ts +22 -0
- package/showcase/rest.d.ts +11 -0
- package/showcase/rest.js +318 -0
- package/showcase/rest.js.map +1 -1
- package/showcase/rest.ts +362 -0
- package/showcase/result/CreateRandomShowcaseMasterResult.d.ts +14 -0
- package/showcase/result/CreateRandomShowcaseMasterResult.js +48 -0
- package/showcase/result/CreateRandomShowcaseMasterResult.js.map +1 -0
- package/showcase/result/CreateRandomShowcaseMasterResult.ts +48 -0
- package/showcase/result/DeleteRandomShowcaseMasterResult.d.ts +14 -0
- package/showcase/result/DeleteRandomShowcaseMasterResult.js +48 -0
- package/showcase/result/DeleteRandomShowcaseMasterResult.js.map +1 -0
- package/showcase/result/DeleteRandomShowcaseMasterResult.ts +48 -0
- package/showcase/result/DescribeRandomShowcaseMastersResult.d.ts +18 -0
- package/showcase/result/DescribeRandomShowcaseMastersResult.js +67 -0
- package/showcase/result/DescribeRandomShowcaseMastersResult.js.map +1 -0
- package/showcase/result/DescribeRandomShowcaseMastersResult.ts +73 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsByUserIdResult.d.ts +14 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsByUserIdResult.js +53 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsByUserIdResult.js.map +1 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsByUserIdResult.ts +56 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsResult.d.ts +14 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsResult.js +53 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsResult.js.map +1 -0
- package/showcase/result/DescribeRandomShowcaseSalesItemsResult.ts +56 -0
- package/showcase/result/GetRandomShowcaseMasterResult.d.ts +14 -0
- package/showcase/result/GetRandomShowcaseMasterResult.js +48 -0
- package/showcase/result/GetRandomShowcaseMasterResult.js.map +1 -0
- package/showcase/result/GetRandomShowcaseMasterResult.ts +48 -0
- package/showcase/result/IncrementPurchaseCountByStampTaskResult.d.ts +18 -0
- package/showcase/result/IncrementPurchaseCountByStampTaskResult.js +62 -0
- package/showcase/result/IncrementPurchaseCountByStampTaskResult.js.map +1 -0
- package/showcase/result/IncrementPurchaseCountByStampTaskResult.ts +65 -0
- package/showcase/result/IncrementPurchaseCountByUserIdResult.d.ts +14 -0
- package/showcase/result/IncrementPurchaseCountByUserIdResult.js +48 -0
- package/showcase/result/IncrementPurchaseCountByUserIdResult.js.map +1 -0
- package/showcase/result/IncrementPurchaseCountByUserIdResult.ts +48 -0
- package/showcase/result/RandomShowcaseBuyByUserIdResult.d.ts +30 -0
- package/showcase/result/RandomShowcaseBuyByUserIdResult.js +104 -0
- package/showcase/result/RandomShowcaseBuyByUserIdResult.js.map +1 -0
- package/showcase/result/RandomShowcaseBuyByUserIdResult.ts +116 -0
- package/showcase/result/RandomShowcaseBuyResult.d.ts +30 -0
- package/showcase/result/RandomShowcaseBuyResult.js +104 -0
- package/showcase/result/RandomShowcaseBuyResult.js.map +1 -0
- package/showcase/result/RandomShowcaseBuyResult.ts +116 -0
- package/showcase/result/UpdateRandomShowcaseMasterResult.d.ts +14 -0
- package/showcase/result/UpdateRandomShowcaseMasterResult.js +48 -0
- package/showcase/result/UpdateRandomShowcaseMasterResult.js.map +1 -0
- package/showcase/result/UpdateRandomShowcaseMasterResult.ts +48 -0
- package/showcase/result/index.d.ts +12 -1
- package/showcase/result/index.js +23 -1
- package/showcase/result/index.js.map +1 -1
- package/showcase/result/index.ts +22 -0
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class PurchaseCount implements IModel {
|
|
3
|
+
private name;
|
|
4
|
+
private count;
|
|
5
|
+
getName(): string | null;
|
|
6
|
+
setName(name: string | null): this;
|
|
7
|
+
withName(name: string | null): this;
|
|
8
|
+
getCount(): number | null;
|
|
9
|
+
setCount(count: number | null): this;
|
|
10
|
+
withCount(count: number | null): this;
|
|
11
|
+
static fromDict(data: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}): PurchaseCount | null;
|
|
14
|
+
toDict(): {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 PurchaseCount = /** @class */ (function () {
|
|
19
|
+
function PurchaseCount() {
|
|
20
|
+
this.name = null;
|
|
21
|
+
this.count = null;
|
|
22
|
+
}
|
|
23
|
+
PurchaseCount.prototype.getName = function () {
|
|
24
|
+
return this.name;
|
|
25
|
+
};
|
|
26
|
+
PurchaseCount.prototype.setName = function (name) {
|
|
27
|
+
this.name = name;
|
|
28
|
+
return this;
|
|
29
|
+
};
|
|
30
|
+
PurchaseCount.prototype.withName = function (name) {
|
|
31
|
+
this.name = name;
|
|
32
|
+
return this;
|
|
33
|
+
};
|
|
34
|
+
PurchaseCount.prototype.getCount = function () {
|
|
35
|
+
return this.count;
|
|
36
|
+
};
|
|
37
|
+
PurchaseCount.prototype.setCount = function (count) {
|
|
38
|
+
this.count = count;
|
|
39
|
+
return this;
|
|
40
|
+
};
|
|
41
|
+
PurchaseCount.prototype.withCount = function (count) {
|
|
42
|
+
this.count = count;
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
PurchaseCount.fromDict = function (data) {
|
|
46
|
+
if (data == undefined || data == null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return new PurchaseCount()
|
|
50
|
+
.withName(data["name"])
|
|
51
|
+
.withCount(data["count"]);
|
|
52
|
+
};
|
|
53
|
+
PurchaseCount.prototype.toDict = function () {
|
|
54
|
+
return {
|
|
55
|
+
"name": this.getName(),
|
|
56
|
+
"count": this.getCount(),
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
return PurchaseCount;
|
|
60
|
+
}());
|
|
61
|
+
exports.default = PurchaseCount;
|
|
62
|
+
//# sourceMappingURL=PurchaseCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PurchaseCount.js","sourceRoot":"","sources":["PurchaseCount.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH;IAAA;QACY,SAAI,GAAgB,IAAI,CAAC;QACzB,UAAK,GAAgB,IAAI,CAAC;IAuCtC,CAAC;IAtCU,+BAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACM,+BAAO,GAAd,UAAe,IAAiB;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,gCAAQ,GAAf,UAAgB,IAAiB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,gCAAQ,GAAf;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACM,gCAAQ,GAAf,UAAgB,KAAkB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,iCAAS,GAAhB,UAAiB,KAAkB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,sBAAQ,GAAtB,UAAuB,IAA0B;QAC7C,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,aAAa,EAAE;aACrB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,CAAC;IAEM,8BAAM,GAAb;QACI,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC;IACN,CAAC;IACL,oBAAC;AAAD,CAAC,AAzCD,IAyCC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 PurchaseCount implements IModel {
|
|
20
|
+
private name: string|null = null;
|
|
21
|
+
private count: number|null = null;
|
|
22
|
+
public getName(): string|null {
|
|
23
|
+
return this.name;
|
|
24
|
+
}
|
|
25
|
+
public setName(name: string|null) {
|
|
26
|
+
this.name = name;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
public withName(name: string|null): this {
|
|
30
|
+
this.name = name;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
public getCount(): number|null {
|
|
34
|
+
return this.count;
|
|
35
|
+
}
|
|
36
|
+
public setCount(count: number|null) {
|
|
37
|
+
this.count = count;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
public withCount(count: number|null): this {
|
|
41
|
+
this.count = count;
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static fromDict(data: {[key: string]: any}): PurchaseCount|null {
|
|
46
|
+
if (data == undefined || data == null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return new PurchaseCount()
|
|
50
|
+
.withName(data["name"])
|
|
51
|
+
.withCount(data["count"]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public toDict(): {[key: string]: any} {
|
|
55
|
+
return {
|
|
56
|
+
"name": this.getName(),
|
|
57
|
+
"count": this.getCount(),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
import ConsumeAction from './ConsumeAction';
|
|
3
|
+
import AcquireAction from './AcquireAction';
|
|
4
|
+
export default class RandomDisplayItem implements IModel {
|
|
5
|
+
private name;
|
|
6
|
+
private metadata;
|
|
7
|
+
private consumeActions;
|
|
8
|
+
private acquireActions;
|
|
9
|
+
private currentPurchaseCount;
|
|
10
|
+
private maximumPurchaseCount;
|
|
11
|
+
getName(): string | null;
|
|
12
|
+
setName(name: string | null): this;
|
|
13
|
+
withName(name: string | null): this;
|
|
14
|
+
getMetadata(): string | null;
|
|
15
|
+
setMetadata(metadata: string | null): this;
|
|
16
|
+
withMetadata(metadata: string | null): this;
|
|
17
|
+
getConsumeActions(): ConsumeAction[] | null;
|
|
18
|
+
setConsumeActions(consumeActions: ConsumeAction[] | null): this;
|
|
19
|
+
withConsumeActions(consumeActions: ConsumeAction[] | null): this;
|
|
20
|
+
getAcquireActions(): AcquireAction[] | null;
|
|
21
|
+
setAcquireActions(acquireActions: AcquireAction[] | null): this;
|
|
22
|
+
withAcquireActions(acquireActions: AcquireAction[] | null): this;
|
|
23
|
+
getCurrentPurchaseCount(): number | null;
|
|
24
|
+
setCurrentPurchaseCount(currentPurchaseCount: number | null): this;
|
|
25
|
+
withCurrentPurchaseCount(currentPurchaseCount: number | null): this;
|
|
26
|
+
getMaximumPurchaseCount(): number | null;
|
|
27
|
+
setMaximumPurchaseCount(maximumPurchaseCount: number | null): this;
|
|
28
|
+
withMaximumPurchaseCount(maximumPurchaseCount: number | null): this;
|
|
29
|
+
static fromDict(data: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}): RandomDisplayItem | null;
|
|
32
|
+
toDict(): {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 tslib_1 = require("tslib");
|
|
19
|
+
var ConsumeAction_1 = tslib_1.__importDefault(require("./ConsumeAction"));
|
|
20
|
+
var AcquireAction_1 = tslib_1.__importDefault(require("./AcquireAction"));
|
|
21
|
+
var RandomDisplayItem = /** @class */ (function () {
|
|
22
|
+
function RandomDisplayItem() {
|
|
23
|
+
this.name = null;
|
|
24
|
+
this.metadata = null;
|
|
25
|
+
this.consumeActions = null;
|
|
26
|
+
this.acquireActions = null;
|
|
27
|
+
this.currentPurchaseCount = null;
|
|
28
|
+
this.maximumPurchaseCount = null;
|
|
29
|
+
}
|
|
30
|
+
RandomDisplayItem.prototype.getName = function () {
|
|
31
|
+
return this.name;
|
|
32
|
+
};
|
|
33
|
+
RandomDisplayItem.prototype.setName = function (name) {
|
|
34
|
+
this.name = name;
|
|
35
|
+
return this;
|
|
36
|
+
};
|
|
37
|
+
RandomDisplayItem.prototype.withName = function (name) {
|
|
38
|
+
this.name = name;
|
|
39
|
+
return this;
|
|
40
|
+
};
|
|
41
|
+
RandomDisplayItem.prototype.getMetadata = function () {
|
|
42
|
+
return this.metadata;
|
|
43
|
+
};
|
|
44
|
+
RandomDisplayItem.prototype.setMetadata = function (metadata) {
|
|
45
|
+
this.metadata = metadata;
|
|
46
|
+
return this;
|
|
47
|
+
};
|
|
48
|
+
RandomDisplayItem.prototype.withMetadata = function (metadata) {
|
|
49
|
+
this.metadata = metadata;
|
|
50
|
+
return this;
|
|
51
|
+
};
|
|
52
|
+
RandomDisplayItem.prototype.getConsumeActions = function () {
|
|
53
|
+
return this.consumeActions;
|
|
54
|
+
};
|
|
55
|
+
RandomDisplayItem.prototype.setConsumeActions = function (consumeActions) {
|
|
56
|
+
this.consumeActions = consumeActions;
|
|
57
|
+
return this;
|
|
58
|
+
};
|
|
59
|
+
RandomDisplayItem.prototype.withConsumeActions = function (consumeActions) {
|
|
60
|
+
this.consumeActions = consumeActions;
|
|
61
|
+
return this;
|
|
62
|
+
};
|
|
63
|
+
RandomDisplayItem.prototype.getAcquireActions = function () {
|
|
64
|
+
return this.acquireActions;
|
|
65
|
+
};
|
|
66
|
+
RandomDisplayItem.prototype.setAcquireActions = function (acquireActions) {
|
|
67
|
+
this.acquireActions = acquireActions;
|
|
68
|
+
return this;
|
|
69
|
+
};
|
|
70
|
+
RandomDisplayItem.prototype.withAcquireActions = function (acquireActions) {
|
|
71
|
+
this.acquireActions = acquireActions;
|
|
72
|
+
return this;
|
|
73
|
+
};
|
|
74
|
+
RandomDisplayItem.prototype.getCurrentPurchaseCount = function () {
|
|
75
|
+
return this.currentPurchaseCount;
|
|
76
|
+
};
|
|
77
|
+
RandomDisplayItem.prototype.setCurrentPurchaseCount = function (currentPurchaseCount) {
|
|
78
|
+
this.currentPurchaseCount = currentPurchaseCount;
|
|
79
|
+
return this;
|
|
80
|
+
};
|
|
81
|
+
RandomDisplayItem.prototype.withCurrentPurchaseCount = function (currentPurchaseCount) {
|
|
82
|
+
this.currentPurchaseCount = currentPurchaseCount;
|
|
83
|
+
return this;
|
|
84
|
+
};
|
|
85
|
+
RandomDisplayItem.prototype.getMaximumPurchaseCount = function () {
|
|
86
|
+
return this.maximumPurchaseCount;
|
|
87
|
+
};
|
|
88
|
+
RandomDisplayItem.prototype.setMaximumPurchaseCount = function (maximumPurchaseCount) {
|
|
89
|
+
this.maximumPurchaseCount = maximumPurchaseCount;
|
|
90
|
+
return this;
|
|
91
|
+
};
|
|
92
|
+
RandomDisplayItem.prototype.withMaximumPurchaseCount = function (maximumPurchaseCount) {
|
|
93
|
+
this.maximumPurchaseCount = maximumPurchaseCount;
|
|
94
|
+
return this;
|
|
95
|
+
};
|
|
96
|
+
RandomDisplayItem.fromDict = function (data) {
|
|
97
|
+
if (data == undefined || data == null) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return new RandomDisplayItem()
|
|
101
|
+
.withName(data["name"])
|
|
102
|
+
.withMetadata(data["metadata"])
|
|
103
|
+
.withConsumeActions(data.consumeActions ?
|
|
104
|
+
data.consumeActions.map(function (item) {
|
|
105
|
+
return ConsumeAction_1.default.fromDict(item);
|
|
106
|
+
}) : [])
|
|
107
|
+
.withAcquireActions(data.acquireActions ?
|
|
108
|
+
data.acquireActions.map(function (item) {
|
|
109
|
+
return AcquireAction_1.default.fromDict(item);
|
|
110
|
+
}) : [])
|
|
111
|
+
.withCurrentPurchaseCount(data["currentPurchaseCount"])
|
|
112
|
+
.withMaximumPurchaseCount(data["maximumPurchaseCount"]);
|
|
113
|
+
};
|
|
114
|
+
RandomDisplayItem.prototype.toDict = function () {
|
|
115
|
+
return {
|
|
116
|
+
"name": this.getName(),
|
|
117
|
+
"metadata": this.getMetadata(),
|
|
118
|
+
"consumeActions": this.getConsumeActions() ?
|
|
119
|
+
this.getConsumeActions().map(function (item) {
|
|
120
|
+
return item.toDict();
|
|
121
|
+
}) : [],
|
|
122
|
+
"acquireActions": this.getAcquireActions() ?
|
|
123
|
+
this.getAcquireActions().map(function (item) {
|
|
124
|
+
return item.toDict();
|
|
125
|
+
}) : [],
|
|
126
|
+
"currentPurchaseCount": this.getCurrentPurchaseCount(),
|
|
127
|
+
"maximumPurchaseCount": this.getMaximumPurchaseCount(),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
return RandomDisplayItem;
|
|
131
|
+
}());
|
|
132
|
+
exports.default = RandomDisplayItem;
|
|
133
|
+
//# sourceMappingURL=RandomDisplayItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RandomDisplayItem.js","sourceRoot":"","sources":["RandomDisplayItem.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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
|
+
import ConsumeAction from './ConsumeAction';
|
|
19
|
+
import AcquireAction from './AcquireAction';
|
|
20
|
+
|
|
21
|
+
export default class RandomDisplayItem implements IModel {
|
|
22
|
+
private name: string|null = null;
|
|
23
|
+
private metadata: string|null = null;
|
|
24
|
+
private consumeActions: ConsumeAction[]|null = null;
|
|
25
|
+
private acquireActions: AcquireAction[]|null = null;
|
|
26
|
+
private currentPurchaseCount: number|null = null;
|
|
27
|
+
private maximumPurchaseCount: number|null = null;
|
|
28
|
+
public getName(): string|null {
|
|
29
|
+
return this.name;
|
|
30
|
+
}
|
|
31
|
+
public setName(name: string|null) {
|
|
32
|
+
this.name = name;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
public withName(name: string|null): this {
|
|
36
|
+
this.name = name;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
public getMetadata(): string|null {
|
|
40
|
+
return this.metadata;
|
|
41
|
+
}
|
|
42
|
+
public setMetadata(metadata: string|null) {
|
|
43
|
+
this.metadata = metadata;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
public withMetadata(metadata: string|null): this {
|
|
47
|
+
this.metadata = metadata;
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
public getConsumeActions(): ConsumeAction[]|null {
|
|
51
|
+
return this.consumeActions;
|
|
52
|
+
}
|
|
53
|
+
public setConsumeActions(consumeActions: ConsumeAction[]|null) {
|
|
54
|
+
this.consumeActions = consumeActions;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
public withConsumeActions(consumeActions: ConsumeAction[]|null): this {
|
|
58
|
+
this.consumeActions = consumeActions;
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
public getAcquireActions(): AcquireAction[]|null {
|
|
62
|
+
return this.acquireActions;
|
|
63
|
+
}
|
|
64
|
+
public setAcquireActions(acquireActions: AcquireAction[]|null) {
|
|
65
|
+
this.acquireActions = acquireActions;
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
public withAcquireActions(acquireActions: AcquireAction[]|null): this {
|
|
69
|
+
this.acquireActions = acquireActions;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
public getCurrentPurchaseCount(): number|null {
|
|
73
|
+
return this.currentPurchaseCount;
|
|
74
|
+
}
|
|
75
|
+
public setCurrentPurchaseCount(currentPurchaseCount: number|null) {
|
|
76
|
+
this.currentPurchaseCount = currentPurchaseCount;
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
public withCurrentPurchaseCount(currentPurchaseCount: number|null): this {
|
|
80
|
+
this.currentPurchaseCount = currentPurchaseCount;
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
public getMaximumPurchaseCount(): number|null {
|
|
84
|
+
return this.maximumPurchaseCount;
|
|
85
|
+
}
|
|
86
|
+
public setMaximumPurchaseCount(maximumPurchaseCount: number|null) {
|
|
87
|
+
this.maximumPurchaseCount = maximumPurchaseCount;
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
public withMaximumPurchaseCount(maximumPurchaseCount: number|null): this {
|
|
91
|
+
this.maximumPurchaseCount = maximumPurchaseCount;
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public static fromDict(data: {[key: string]: any}): RandomDisplayItem|null {
|
|
96
|
+
if (data == undefined || data == null) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
return new RandomDisplayItem()
|
|
100
|
+
.withName(data["name"])
|
|
101
|
+
.withMetadata(data["metadata"])
|
|
102
|
+
.withConsumeActions(data.consumeActions ?
|
|
103
|
+
data.consumeActions.map((item: {[key: string]: any}) => {
|
|
104
|
+
return ConsumeAction.fromDict(item);
|
|
105
|
+
}
|
|
106
|
+
) : [])
|
|
107
|
+
.withAcquireActions(data.acquireActions ?
|
|
108
|
+
data.acquireActions.map((item: {[key: string]: any}) => {
|
|
109
|
+
return AcquireAction.fromDict(item);
|
|
110
|
+
}
|
|
111
|
+
) : [])
|
|
112
|
+
.withCurrentPurchaseCount(data["currentPurchaseCount"])
|
|
113
|
+
.withMaximumPurchaseCount(data["maximumPurchaseCount"]);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public toDict(): {[key: string]: any} {
|
|
117
|
+
return {
|
|
118
|
+
"name": this.getName(),
|
|
119
|
+
"metadata": this.getMetadata(),
|
|
120
|
+
"consumeActions": this.getConsumeActions() ?
|
|
121
|
+
this.getConsumeActions()!.map((item: ConsumeAction) => {
|
|
122
|
+
return item.toDict();
|
|
123
|
+
}
|
|
124
|
+
) : [],
|
|
125
|
+
"acquireActions": this.getAcquireActions() ?
|
|
126
|
+
this.getAcquireActions()!.map((item: AcquireAction) => {
|
|
127
|
+
return item.toDict();
|
|
128
|
+
}
|
|
129
|
+
) : [],
|
|
130
|
+
"currentPurchaseCount": this.getCurrentPurchaseCount(),
|
|
131
|
+
"maximumPurchaseCount": this.getMaximumPurchaseCount(),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
import ConsumeAction from './ConsumeAction';
|
|
3
|
+
import AcquireAction from './AcquireAction';
|
|
4
|
+
export default class RandomDisplayItemModel implements IModel {
|
|
5
|
+
private name;
|
|
6
|
+
private metadata;
|
|
7
|
+
private consumeActions;
|
|
8
|
+
private acquireActions;
|
|
9
|
+
private stock;
|
|
10
|
+
private weight;
|
|
11
|
+
getName(): string | null;
|
|
12
|
+
setName(name: string | null): this;
|
|
13
|
+
withName(name: string | null): this;
|
|
14
|
+
getMetadata(): string | null;
|
|
15
|
+
setMetadata(metadata: string | null): this;
|
|
16
|
+
withMetadata(metadata: string | null): this;
|
|
17
|
+
getConsumeActions(): ConsumeAction[] | null;
|
|
18
|
+
setConsumeActions(consumeActions: ConsumeAction[] | null): this;
|
|
19
|
+
withConsumeActions(consumeActions: ConsumeAction[] | null): this;
|
|
20
|
+
getAcquireActions(): AcquireAction[] | null;
|
|
21
|
+
setAcquireActions(acquireActions: AcquireAction[] | null): this;
|
|
22
|
+
withAcquireActions(acquireActions: AcquireAction[] | null): this;
|
|
23
|
+
getStock(): number | null;
|
|
24
|
+
setStock(stock: number | null): this;
|
|
25
|
+
withStock(stock: number | null): this;
|
|
26
|
+
getWeight(): number | null;
|
|
27
|
+
setWeight(weight: number | null): this;
|
|
28
|
+
withWeight(weight: number | null): this;
|
|
29
|
+
static fromDict(data: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}): RandomDisplayItemModel | null;
|
|
32
|
+
toDict(): {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 tslib_1 = require("tslib");
|
|
19
|
+
var ConsumeAction_1 = tslib_1.__importDefault(require("./ConsumeAction"));
|
|
20
|
+
var AcquireAction_1 = tslib_1.__importDefault(require("./AcquireAction"));
|
|
21
|
+
var RandomDisplayItemModel = /** @class */ (function () {
|
|
22
|
+
function RandomDisplayItemModel() {
|
|
23
|
+
this.name = null;
|
|
24
|
+
this.metadata = null;
|
|
25
|
+
this.consumeActions = null;
|
|
26
|
+
this.acquireActions = null;
|
|
27
|
+
this.stock = null;
|
|
28
|
+
this.weight = null;
|
|
29
|
+
}
|
|
30
|
+
RandomDisplayItemModel.prototype.getName = function () {
|
|
31
|
+
return this.name;
|
|
32
|
+
};
|
|
33
|
+
RandomDisplayItemModel.prototype.setName = function (name) {
|
|
34
|
+
this.name = name;
|
|
35
|
+
return this;
|
|
36
|
+
};
|
|
37
|
+
RandomDisplayItemModel.prototype.withName = function (name) {
|
|
38
|
+
this.name = name;
|
|
39
|
+
return this;
|
|
40
|
+
};
|
|
41
|
+
RandomDisplayItemModel.prototype.getMetadata = function () {
|
|
42
|
+
return this.metadata;
|
|
43
|
+
};
|
|
44
|
+
RandomDisplayItemModel.prototype.setMetadata = function (metadata) {
|
|
45
|
+
this.metadata = metadata;
|
|
46
|
+
return this;
|
|
47
|
+
};
|
|
48
|
+
RandomDisplayItemModel.prototype.withMetadata = function (metadata) {
|
|
49
|
+
this.metadata = metadata;
|
|
50
|
+
return this;
|
|
51
|
+
};
|
|
52
|
+
RandomDisplayItemModel.prototype.getConsumeActions = function () {
|
|
53
|
+
return this.consumeActions;
|
|
54
|
+
};
|
|
55
|
+
RandomDisplayItemModel.prototype.setConsumeActions = function (consumeActions) {
|
|
56
|
+
this.consumeActions = consumeActions;
|
|
57
|
+
return this;
|
|
58
|
+
};
|
|
59
|
+
RandomDisplayItemModel.prototype.withConsumeActions = function (consumeActions) {
|
|
60
|
+
this.consumeActions = consumeActions;
|
|
61
|
+
return this;
|
|
62
|
+
};
|
|
63
|
+
RandomDisplayItemModel.prototype.getAcquireActions = function () {
|
|
64
|
+
return this.acquireActions;
|
|
65
|
+
};
|
|
66
|
+
RandomDisplayItemModel.prototype.setAcquireActions = function (acquireActions) {
|
|
67
|
+
this.acquireActions = acquireActions;
|
|
68
|
+
return this;
|
|
69
|
+
};
|
|
70
|
+
RandomDisplayItemModel.prototype.withAcquireActions = function (acquireActions) {
|
|
71
|
+
this.acquireActions = acquireActions;
|
|
72
|
+
return this;
|
|
73
|
+
};
|
|
74
|
+
RandomDisplayItemModel.prototype.getStock = function () {
|
|
75
|
+
return this.stock;
|
|
76
|
+
};
|
|
77
|
+
RandomDisplayItemModel.prototype.setStock = function (stock) {
|
|
78
|
+
this.stock = stock;
|
|
79
|
+
return this;
|
|
80
|
+
};
|
|
81
|
+
RandomDisplayItemModel.prototype.withStock = function (stock) {
|
|
82
|
+
this.stock = stock;
|
|
83
|
+
return this;
|
|
84
|
+
};
|
|
85
|
+
RandomDisplayItemModel.prototype.getWeight = function () {
|
|
86
|
+
return this.weight;
|
|
87
|
+
};
|
|
88
|
+
RandomDisplayItemModel.prototype.setWeight = function (weight) {
|
|
89
|
+
this.weight = weight;
|
|
90
|
+
return this;
|
|
91
|
+
};
|
|
92
|
+
RandomDisplayItemModel.prototype.withWeight = function (weight) {
|
|
93
|
+
this.weight = weight;
|
|
94
|
+
return this;
|
|
95
|
+
};
|
|
96
|
+
RandomDisplayItemModel.fromDict = function (data) {
|
|
97
|
+
if (data == undefined || data == null) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return new RandomDisplayItemModel()
|
|
101
|
+
.withName(data["name"])
|
|
102
|
+
.withMetadata(data["metadata"])
|
|
103
|
+
.withConsumeActions(data.consumeActions ?
|
|
104
|
+
data.consumeActions.map(function (item) {
|
|
105
|
+
return ConsumeAction_1.default.fromDict(item);
|
|
106
|
+
}) : [])
|
|
107
|
+
.withAcquireActions(data.acquireActions ?
|
|
108
|
+
data.acquireActions.map(function (item) {
|
|
109
|
+
return AcquireAction_1.default.fromDict(item);
|
|
110
|
+
}) : [])
|
|
111
|
+
.withStock(data["stock"])
|
|
112
|
+
.withWeight(data["weight"]);
|
|
113
|
+
};
|
|
114
|
+
RandomDisplayItemModel.prototype.toDict = function () {
|
|
115
|
+
return {
|
|
116
|
+
"name": this.getName(),
|
|
117
|
+
"metadata": this.getMetadata(),
|
|
118
|
+
"consumeActions": this.getConsumeActions() ?
|
|
119
|
+
this.getConsumeActions().map(function (item) {
|
|
120
|
+
return item.toDict();
|
|
121
|
+
}) : [],
|
|
122
|
+
"acquireActions": this.getAcquireActions() ?
|
|
123
|
+
this.getAcquireActions().map(function (item) {
|
|
124
|
+
return item.toDict();
|
|
125
|
+
}) : [],
|
|
126
|
+
"stock": this.getStock(),
|
|
127
|
+
"weight": this.getWeight(),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
return RandomDisplayItemModel;
|
|
131
|
+
}());
|
|
132
|
+
exports.default = RandomDisplayItemModel;
|
|
133
|
+
//# sourceMappingURL=RandomDisplayItemModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RandomDisplayItemModel.js","sourceRoot":"","sources":["RandomDisplayItemModel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,0EAA4C;AAC5C,0EAA4C;AAE5C;IAAA;QACY,SAAI,GAAgB,IAAI,CAAC;QACzB,aAAQ,GAAgB,IAAI,CAAC;QAC7B,mBAAc,GAAyB,IAAI,CAAC;QAC5C,mBAAc,GAAyB,IAAI,CAAC;QAC5C,UAAK,GAAgB,IAAI,CAAC;QAC1B,WAAM,GAAgB,IAAI,CAAC;IA2GvC,CAAC;IA1GU,wCAAO,GAAd;QACI,OAA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