gs2 1.4.24 → 1.4.26
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/guard/index.d.ts +5 -0
- package/guard/index.js +28 -0
- package/guard/index.js.map +1 -0
- package/guard/index.ts +27 -0
- package/guard/model/BlockingPolicyModel.d.ts +65 -0
- package/guard/model/BlockingPolicyModel.js +248 -0
- package/guard/model/BlockingPolicyModel.js.map +1 -0
- package/guard/model/BlockingPolicyModel.ts +252 -0
- package/guard/model/Namespace.d.ts +43 -0
- package/guard/model/Namespace.js +184 -0
- package/guard/model/Namespace.js.map +1 -0
- package/guard/model/Namespace.ts +192 -0
- package/guard/model/index.d.ts +3 -0
- package/guard/model/index.js +24 -0
- package/guard/model/index.js.map +1 -0
- package/guard/model/index.ts +22 -0
- package/guard/request/CreateNamespaceRequest.d.ts +30 -0
- package/guard/request/CreateNamespaceRequest.js +100 -0
- package/guard/request/CreateNamespaceRequest.js.map +1 -0
- package/guard/request/CreateNamespaceRequest.ts +104 -0
- package/guard/request/DeleteNamespaceRequest.d.ts +21 -0
- package/guard/request/DeleteNamespaceRequest.js +69 -0
- package/guard/request/DeleteNamespaceRequest.js.map +1 -0
- package/guard/request/DeleteNamespaceRequest.ts +76 -0
- package/guard/request/DescribeNamespacesRequest.d.ts +25 -0
- package/guard/request/DescribeNamespacesRequest.js +83 -0
- package/guard/request/DescribeNamespacesRequest.js.map +1 -0
- package/guard/request/DescribeNamespacesRequest.ts +90 -0
- package/guard/request/GetNamespaceRequest.d.ts +21 -0
- package/guard/request/GetNamespaceRequest.js +69 -0
- package/guard/request/GetNamespaceRequest.js.map +1 -0
- package/guard/request/GetNamespaceRequest.ts +76 -0
- package/guard/request/GetNamespaceStatusRequest.d.ts +21 -0
- package/guard/request/GetNamespaceStatusRequest.js +69 -0
- package/guard/request/GetNamespaceStatusRequest.js.map +1 -0
- package/guard/request/GetNamespaceStatusRequest.ts +76 -0
- package/guard/request/UpdateNamespaceRequest.d.ts +30 -0
- package/guard/request/UpdateNamespaceRequest.js +100 -0
- package/guard/request/UpdateNamespaceRequest.js.map +1 -0
- package/guard/request/UpdateNamespaceRequest.ts +104 -0
- package/guard/request/index.d.ts +7 -0
- package/guard/request/index.js +32 -0
- package/guard/request/index.js.map +1 -0
- package/guard/request/index.ts +30 -0
- package/guard/rest.d.ts +13 -0
- package/guard/rest.js +176 -0
- package/guard/rest.js.map +1 -0
- package/guard/rest.ts +198 -0
- package/guard/result/CreateNamespaceResult.d.ts +14 -0
- package/guard/result/CreateNamespaceResult.js +48 -0
- package/guard/result/CreateNamespaceResult.js.map +1 -0
- package/guard/result/CreateNamespaceResult.ts +47 -0
- package/guard/result/DeleteNamespaceResult.d.ts +14 -0
- package/guard/result/DeleteNamespaceResult.js +48 -0
- package/guard/result/DeleteNamespaceResult.js.map +1 -0
- package/guard/result/DeleteNamespaceResult.ts +47 -0
- package/guard/result/DescribeNamespacesResult.d.ts +18 -0
- package/guard/result/DescribeNamespacesResult.js +67 -0
- package/guard/result/DescribeNamespacesResult.js.map +1 -0
- package/guard/result/DescribeNamespacesResult.ts +72 -0
- package/guard/result/GetNamespaceResult.d.ts +14 -0
- package/guard/result/GetNamespaceResult.js +48 -0
- package/guard/result/GetNamespaceResult.js.map +1 -0
- package/guard/result/GetNamespaceResult.ts +47 -0
- package/guard/result/GetNamespaceStatusResult.d.ts +13 -0
- package/guard/result/GetNamespaceStatusResult.js +45 -0
- package/guard/result/GetNamespaceStatusResult.js.map +1 -0
- package/guard/result/GetNamespaceStatusResult.ts +46 -0
- package/guard/result/UpdateNamespaceResult.d.ts +14 -0
- package/guard/result/UpdateNamespaceResult.js +48 -0
- package/guard/result/UpdateNamespaceResult.js.map +1 -0
- package/guard/result/UpdateNamespaceResult.ts +47 -0
- package/guard/result/index.d.ts +7 -0
- package/guard/result/index.js +32 -0
- package/guard/result/index.js.map +1 -0
- package/guard/result/index.ts +30 -0
- package/identifier/request/AttachGuardRequest.d.ts +29 -0
- package/identifier/request/AttachGuardRequest.js +97 -0
- package/identifier/request/AttachGuardRequest.js.map +1 -0
- package/identifier/request/AttachGuardRequest.ts +104 -0
- package/identifier/request/DescribeAttachedGuardsRequest.d.ts +25 -0
- package/identifier/request/DescribeAttachedGuardsRequest.js +83 -0
- package/identifier/request/DescribeAttachedGuardsRequest.js.map +1 -0
- package/identifier/request/DescribeAttachedGuardsRequest.ts +90 -0
- package/identifier/request/DetachGuardRequest.d.ts +29 -0
- package/identifier/request/DetachGuardRequest.js +97 -0
- package/identifier/request/DetachGuardRequest.js.map +1 -0
- package/identifier/request/DetachGuardRequest.ts +104 -0
- package/identifier/request/index.d.ts +4 -1
- package/identifier/request/index.js +7 -1
- package/identifier/request/index.js.map +1 -1
- package/identifier/request/index.ts +6 -0
- package/identifier/rest.d.ts +3 -0
- package/identifier/rest.js +75 -0
- package/identifier/rest.js.map +1 -1
- package/identifier/rest.ts +87 -0
- package/identifier/result/AttachGuardResult.d.ts +13 -0
- package/identifier/result/AttachGuardResult.js +51 -0
- package/identifier/result/AttachGuardResult.js.map +1 -0
- package/identifier/result/AttachGuardResult.ts +54 -0
- package/identifier/result/DescribeAttachedGuardsResult.d.ts +13 -0
- package/identifier/result/DescribeAttachedGuardsResult.js +51 -0
- package/identifier/result/DescribeAttachedGuardsResult.js.map +1 -0
- package/identifier/result/DescribeAttachedGuardsResult.ts +54 -0
- package/identifier/result/DetachGuardResult.d.ts +13 -0
- package/identifier/result/DetachGuardResult.js +51 -0
- package/identifier/result/DetachGuardResult.js.map +1 -0
- package/identifier/result/DetachGuardResult.ts +54 -0
- package/identifier/result/index.d.ts +4 -1
- package/identifier/result/index.js +7 -1
- package/identifier/result/index.js.map +1 -1
- package/identifier/result/index.ts +6 -0
- package/index.d.ts +2 -1
- package/index.js +4 -2
- package/index.js.map +1 -1
- package/index.ts +2 -0
- package/lock/request/index.d.ts +1 -3
- package/lock/request/index.js +1 -5
- package/lock/request/index.js.map +1 -1
- package/lock/request/index.ts +0 -4
- package/lock/rest.d.ts +0 -2
- package/lock/rest.js +0 -55
- package/lock/rest.js.map +1 -1
- package/lock/rest.ts +0 -63
- package/lock/result/index.d.ts +1 -3
- package/lock/result/index.js +1 -5
- package/lock/result/index.js.map +1 -1
- package/lock/result/index.ts +0 -4
- package/package.json +1 -1
package/guard/index.d.ts
ADDED
package/guard/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
exports.Gs2GuardRestClient = exports.result = exports.request = exports.model = void 0;
|
|
19
|
+
var tslib_1 = require("tslib");
|
|
20
|
+
var model = tslib_1.__importStar(require("./model"));
|
|
21
|
+
exports.model = model;
|
|
22
|
+
var request = tslib_1.__importStar(require("./request"));
|
|
23
|
+
exports.request = request;
|
|
24
|
+
var result = tslib_1.__importStar(require("./result"));
|
|
25
|
+
exports.result = result;
|
|
26
|
+
var rest_1 = tslib_1.__importDefault(require("./rest"));
|
|
27
|
+
exports.Gs2GuardRestClient = rest_1.default;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,qDAAiC;AAM7B,sBAAK;AALT,yDAAqC;AAMjC,0BAAO;AALX,uDAAmC;AAM/B,wBAAM;AALV,wDAAwC;AAMpC,6BANG,cAAkB,CAMH"}
|
package/guard/index.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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 * as model from './model';
|
|
18
|
+
import * as request from './request';
|
|
19
|
+
import * as result from './result';
|
|
20
|
+
import Gs2GuardRestClient from './rest';
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
model,
|
|
24
|
+
request,
|
|
25
|
+
result,
|
|
26
|
+
Gs2GuardRestClient,
|
|
27
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class BlockingPolicyModel implements IModel {
|
|
3
|
+
private passServices;
|
|
4
|
+
private defaultRestriction;
|
|
5
|
+
private locationDetection;
|
|
6
|
+
private locations;
|
|
7
|
+
private locationRestriction;
|
|
8
|
+
private anonymousIpDetection;
|
|
9
|
+
private anonymousIpRestriction;
|
|
10
|
+
private hostingProviderIpDetection;
|
|
11
|
+
private hostingProviderIpRestriction;
|
|
12
|
+
private reputationIpDetection;
|
|
13
|
+
private reputationIpRestriction;
|
|
14
|
+
private ipAddressesDetection;
|
|
15
|
+
private ipAddresses;
|
|
16
|
+
private ipAddressRestriction;
|
|
17
|
+
getPassServices(): string[] | null;
|
|
18
|
+
setPassServices(passServices: string[] | null): this;
|
|
19
|
+
withPassServices(passServices: string[] | null): this;
|
|
20
|
+
getDefaultRestriction(): string | null;
|
|
21
|
+
setDefaultRestriction(defaultRestriction: string | null): this;
|
|
22
|
+
withDefaultRestriction(defaultRestriction: string | null): this;
|
|
23
|
+
getLocationDetection(): string | null;
|
|
24
|
+
setLocationDetection(locationDetection: string | null): this;
|
|
25
|
+
withLocationDetection(locationDetection: string | null): this;
|
|
26
|
+
getLocations(): string[] | null;
|
|
27
|
+
setLocations(locations: string[] | null): this;
|
|
28
|
+
withLocations(locations: string[] | null): this;
|
|
29
|
+
getLocationRestriction(): string | null;
|
|
30
|
+
setLocationRestriction(locationRestriction: string | null): this;
|
|
31
|
+
withLocationRestriction(locationRestriction: string | null): this;
|
|
32
|
+
getAnonymousIpDetection(): string | null;
|
|
33
|
+
setAnonymousIpDetection(anonymousIpDetection: string | null): this;
|
|
34
|
+
withAnonymousIpDetection(anonymousIpDetection: string | null): this;
|
|
35
|
+
getAnonymousIpRestriction(): string | null;
|
|
36
|
+
setAnonymousIpRestriction(anonymousIpRestriction: string | null): this;
|
|
37
|
+
withAnonymousIpRestriction(anonymousIpRestriction: string | null): this;
|
|
38
|
+
getHostingProviderIpDetection(): string | null;
|
|
39
|
+
setHostingProviderIpDetection(hostingProviderIpDetection: string | null): this;
|
|
40
|
+
withHostingProviderIpDetection(hostingProviderIpDetection: string | null): this;
|
|
41
|
+
getHostingProviderIpRestriction(): string | null;
|
|
42
|
+
setHostingProviderIpRestriction(hostingProviderIpRestriction: string | null): this;
|
|
43
|
+
withHostingProviderIpRestriction(hostingProviderIpRestriction: string | null): this;
|
|
44
|
+
getReputationIpDetection(): string | null;
|
|
45
|
+
setReputationIpDetection(reputationIpDetection: string | null): this;
|
|
46
|
+
withReputationIpDetection(reputationIpDetection: string | null): this;
|
|
47
|
+
getReputationIpRestriction(): string | null;
|
|
48
|
+
setReputationIpRestriction(reputationIpRestriction: string | null): this;
|
|
49
|
+
withReputationIpRestriction(reputationIpRestriction: string | null): this;
|
|
50
|
+
getIpAddressesDetection(): string | null;
|
|
51
|
+
setIpAddressesDetection(ipAddressesDetection: string | null): this;
|
|
52
|
+
withIpAddressesDetection(ipAddressesDetection: string | null): this;
|
|
53
|
+
getIpAddresses(): string[] | null;
|
|
54
|
+
setIpAddresses(ipAddresses: string[] | null): this;
|
|
55
|
+
withIpAddresses(ipAddresses: string[] | null): this;
|
|
56
|
+
getIpAddressRestriction(): string | null;
|
|
57
|
+
setIpAddressRestriction(ipAddressRestriction: string | null): this;
|
|
58
|
+
withIpAddressRestriction(ipAddressRestriction: string | null): this;
|
|
59
|
+
static fromDict(data: {
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}): BlockingPolicyModel | null;
|
|
62
|
+
toDict(): {
|
|
63
|
+
[key: string]: any;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
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 BlockingPolicyModel = /** @class */ (function () {
|
|
19
|
+
function BlockingPolicyModel() {
|
|
20
|
+
this.passServices = null;
|
|
21
|
+
this.defaultRestriction = null;
|
|
22
|
+
this.locationDetection = null;
|
|
23
|
+
this.locations = null;
|
|
24
|
+
this.locationRestriction = null;
|
|
25
|
+
this.anonymousIpDetection = null;
|
|
26
|
+
this.anonymousIpRestriction = null;
|
|
27
|
+
this.hostingProviderIpDetection = null;
|
|
28
|
+
this.hostingProviderIpRestriction = null;
|
|
29
|
+
this.reputationIpDetection = null;
|
|
30
|
+
this.reputationIpRestriction = null;
|
|
31
|
+
this.ipAddressesDetection = null;
|
|
32
|
+
this.ipAddresses = null;
|
|
33
|
+
this.ipAddressRestriction = null;
|
|
34
|
+
}
|
|
35
|
+
BlockingPolicyModel.prototype.getPassServices = function () {
|
|
36
|
+
return this.passServices;
|
|
37
|
+
};
|
|
38
|
+
BlockingPolicyModel.prototype.setPassServices = function (passServices) {
|
|
39
|
+
this.passServices = passServices;
|
|
40
|
+
return this;
|
|
41
|
+
};
|
|
42
|
+
BlockingPolicyModel.prototype.withPassServices = function (passServices) {
|
|
43
|
+
this.passServices = passServices;
|
|
44
|
+
return this;
|
|
45
|
+
};
|
|
46
|
+
BlockingPolicyModel.prototype.getDefaultRestriction = function () {
|
|
47
|
+
return this.defaultRestriction;
|
|
48
|
+
};
|
|
49
|
+
BlockingPolicyModel.prototype.setDefaultRestriction = function (defaultRestriction) {
|
|
50
|
+
this.defaultRestriction = defaultRestriction;
|
|
51
|
+
return this;
|
|
52
|
+
};
|
|
53
|
+
BlockingPolicyModel.prototype.withDefaultRestriction = function (defaultRestriction) {
|
|
54
|
+
this.defaultRestriction = defaultRestriction;
|
|
55
|
+
return this;
|
|
56
|
+
};
|
|
57
|
+
BlockingPolicyModel.prototype.getLocationDetection = function () {
|
|
58
|
+
return this.locationDetection;
|
|
59
|
+
};
|
|
60
|
+
BlockingPolicyModel.prototype.setLocationDetection = function (locationDetection) {
|
|
61
|
+
this.locationDetection = locationDetection;
|
|
62
|
+
return this;
|
|
63
|
+
};
|
|
64
|
+
BlockingPolicyModel.prototype.withLocationDetection = function (locationDetection) {
|
|
65
|
+
this.locationDetection = locationDetection;
|
|
66
|
+
return this;
|
|
67
|
+
};
|
|
68
|
+
BlockingPolicyModel.prototype.getLocations = function () {
|
|
69
|
+
return this.locations;
|
|
70
|
+
};
|
|
71
|
+
BlockingPolicyModel.prototype.setLocations = function (locations) {
|
|
72
|
+
this.locations = locations;
|
|
73
|
+
return this;
|
|
74
|
+
};
|
|
75
|
+
BlockingPolicyModel.prototype.withLocations = function (locations) {
|
|
76
|
+
this.locations = locations;
|
|
77
|
+
return this;
|
|
78
|
+
};
|
|
79
|
+
BlockingPolicyModel.prototype.getLocationRestriction = function () {
|
|
80
|
+
return this.locationRestriction;
|
|
81
|
+
};
|
|
82
|
+
BlockingPolicyModel.prototype.setLocationRestriction = function (locationRestriction) {
|
|
83
|
+
this.locationRestriction = locationRestriction;
|
|
84
|
+
return this;
|
|
85
|
+
};
|
|
86
|
+
BlockingPolicyModel.prototype.withLocationRestriction = function (locationRestriction) {
|
|
87
|
+
this.locationRestriction = locationRestriction;
|
|
88
|
+
return this;
|
|
89
|
+
};
|
|
90
|
+
BlockingPolicyModel.prototype.getAnonymousIpDetection = function () {
|
|
91
|
+
return this.anonymousIpDetection;
|
|
92
|
+
};
|
|
93
|
+
BlockingPolicyModel.prototype.setAnonymousIpDetection = function (anonymousIpDetection) {
|
|
94
|
+
this.anonymousIpDetection = anonymousIpDetection;
|
|
95
|
+
return this;
|
|
96
|
+
};
|
|
97
|
+
BlockingPolicyModel.prototype.withAnonymousIpDetection = function (anonymousIpDetection) {
|
|
98
|
+
this.anonymousIpDetection = anonymousIpDetection;
|
|
99
|
+
return this;
|
|
100
|
+
};
|
|
101
|
+
BlockingPolicyModel.prototype.getAnonymousIpRestriction = function () {
|
|
102
|
+
return this.anonymousIpRestriction;
|
|
103
|
+
};
|
|
104
|
+
BlockingPolicyModel.prototype.setAnonymousIpRestriction = function (anonymousIpRestriction) {
|
|
105
|
+
this.anonymousIpRestriction = anonymousIpRestriction;
|
|
106
|
+
return this;
|
|
107
|
+
};
|
|
108
|
+
BlockingPolicyModel.prototype.withAnonymousIpRestriction = function (anonymousIpRestriction) {
|
|
109
|
+
this.anonymousIpRestriction = anonymousIpRestriction;
|
|
110
|
+
return this;
|
|
111
|
+
};
|
|
112
|
+
BlockingPolicyModel.prototype.getHostingProviderIpDetection = function () {
|
|
113
|
+
return this.hostingProviderIpDetection;
|
|
114
|
+
};
|
|
115
|
+
BlockingPolicyModel.prototype.setHostingProviderIpDetection = function (hostingProviderIpDetection) {
|
|
116
|
+
this.hostingProviderIpDetection = hostingProviderIpDetection;
|
|
117
|
+
return this;
|
|
118
|
+
};
|
|
119
|
+
BlockingPolicyModel.prototype.withHostingProviderIpDetection = function (hostingProviderIpDetection) {
|
|
120
|
+
this.hostingProviderIpDetection = hostingProviderIpDetection;
|
|
121
|
+
return this;
|
|
122
|
+
};
|
|
123
|
+
BlockingPolicyModel.prototype.getHostingProviderIpRestriction = function () {
|
|
124
|
+
return this.hostingProviderIpRestriction;
|
|
125
|
+
};
|
|
126
|
+
BlockingPolicyModel.prototype.setHostingProviderIpRestriction = function (hostingProviderIpRestriction) {
|
|
127
|
+
this.hostingProviderIpRestriction = hostingProviderIpRestriction;
|
|
128
|
+
return this;
|
|
129
|
+
};
|
|
130
|
+
BlockingPolicyModel.prototype.withHostingProviderIpRestriction = function (hostingProviderIpRestriction) {
|
|
131
|
+
this.hostingProviderIpRestriction = hostingProviderIpRestriction;
|
|
132
|
+
return this;
|
|
133
|
+
};
|
|
134
|
+
BlockingPolicyModel.prototype.getReputationIpDetection = function () {
|
|
135
|
+
return this.reputationIpDetection;
|
|
136
|
+
};
|
|
137
|
+
BlockingPolicyModel.prototype.setReputationIpDetection = function (reputationIpDetection) {
|
|
138
|
+
this.reputationIpDetection = reputationIpDetection;
|
|
139
|
+
return this;
|
|
140
|
+
};
|
|
141
|
+
BlockingPolicyModel.prototype.withReputationIpDetection = function (reputationIpDetection) {
|
|
142
|
+
this.reputationIpDetection = reputationIpDetection;
|
|
143
|
+
return this;
|
|
144
|
+
};
|
|
145
|
+
BlockingPolicyModel.prototype.getReputationIpRestriction = function () {
|
|
146
|
+
return this.reputationIpRestriction;
|
|
147
|
+
};
|
|
148
|
+
BlockingPolicyModel.prototype.setReputationIpRestriction = function (reputationIpRestriction) {
|
|
149
|
+
this.reputationIpRestriction = reputationIpRestriction;
|
|
150
|
+
return this;
|
|
151
|
+
};
|
|
152
|
+
BlockingPolicyModel.prototype.withReputationIpRestriction = function (reputationIpRestriction) {
|
|
153
|
+
this.reputationIpRestriction = reputationIpRestriction;
|
|
154
|
+
return this;
|
|
155
|
+
};
|
|
156
|
+
BlockingPolicyModel.prototype.getIpAddressesDetection = function () {
|
|
157
|
+
return this.ipAddressesDetection;
|
|
158
|
+
};
|
|
159
|
+
BlockingPolicyModel.prototype.setIpAddressesDetection = function (ipAddressesDetection) {
|
|
160
|
+
this.ipAddressesDetection = ipAddressesDetection;
|
|
161
|
+
return this;
|
|
162
|
+
};
|
|
163
|
+
BlockingPolicyModel.prototype.withIpAddressesDetection = function (ipAddressesDetection) {
|
|
164
|
+
this.ipAddressesDetection = ipAddressesDetection;
|
|
165
|
+
return this;
|
|
166
|
+
};
|
|
167
|
+
BlockingPolicyModel.prototype.getIpAddresses = function () {
|
|
168
|
+
return this.ipAddresses;
|
|
169
|
+
};
|
|
170
|
+
BlockingPolicyModel.prototype.setIpAddresses = function (ipAddresses) {
|
|
171
|
+
this.ipAddresses = ipAddresses;
|
|
172
|
+
return this;
|
|
173
|
+
};
|
|
174
|
+
BlockingPolicyModel.prototype.withIpAddresses = function (ipAddresses) {
|
|
175
|
+
this.ipAddresses = ipAddresses;
|
|
176
|
+
return this;
|
|
177
|
+
};
|
|
178
|
+
BlockingPolicyModel.prototype.getIpAddressRestriction = function () {
|
|
179
|
+
return this.ipAddressRestriction;
|
|
180
|
+
};
|
|
181
|
+
BlockingPolicyModel.prototype.setIpAddressRestriction = function (ipAddressRestriction) {
|
|
182
|
+
this.ipAddressRestriction = ipAddressRestriction;
|
|
183
|
+
return this;
|
|
184
|
+
};
|
|
185
|
+
BlockingPolicyModel.prototype.withIpAddressRestriction = function (ipAddressRestriction) {
|
|
186
|
+
this.ipAddressRestriction = ipAddressRestriction;
|
|
187
|
+
return this;
|
|
188
|
+
};
|
|
189
|
+
BlockingPolicyModel.fromDict = function (data) {
|
|
190
|
+
if (data == undefined || data == null) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
return new BlockingPolicyModel()
|
|
194
|
+
.withPassServices(data.passServices ?
|
|
195
|
+
data.passServices.map(function (item) {
|
|
196
|
+
return item;
|
|
197
|
+
}) : [])
|
|
198
|
+
.withDefaultRestriction(data["defaultRestriction"])
|
|
199
|
+
.withLocationDetection(data["locationDetection"])
|
|
200
|
+
.withLocations(data.locations ?
|
|
201
|
+
data.locations.map(function (item) {
|
|
202
|
+
return item;
|
|
203
|
+
}) : [])
|
|
204
|
+
.withLocationRestriction(data["locationRestriction"])
|
|
205
|
+
.withAnonymousIpDetection(data["anonymousIpDetection"])
|
|
206
|
+
.withAnonymousIpRestriction(data["anonymousIpRestriction"])
|
|
207
|
+
.withHostingProviderIpDetection(data["hostingProviderIpDetection"])
|
|
208
|
+
.withHostingProviderIpRestriction(data["hostingProviderIpRestriction"])
|
|
209
|
+
.withReputationIpDetection(data["reputationIpDetection"])
|
|
210
|
+
.withReputationIpRestriction(data["reputationIpRestriction"])
|
|
211
|
+
.withIpAddressesDetection(data["ipAddressesDetection"])
|
|
212
|
+
.withIpAddresses(data.ipAddresses ?
|
|
213
|
+
data.ipAddresses.map(function (item) {
|
|
214
|
+
return item;
|
|
215
|
+
}) : [])
|
|
216
|
+
.withIpAddressRestriction(data["ipAddressRestriction"]);
|
|
217
|
+
};
|
|
218
|
+
BlockingPolicyModel.prototype.toDict = function () {
|
|
219
|
+
return {
|
|
220
|
+
"passServices": this.getPassServices() ?
|
|
221
|
+
this.getPassServices().map(function (item) {
|
|
222
|
+
return item;
|
|
223
|
+
}) : [],
|
|
224
|
+
"defaultRestriction": this.getDefaultRestriction(),
|
|
225
|
+
"locationDetection": this.getLocationDetection(),
|
|
226
|
+
"locations": this.getLocations() ?
|
|
227
|
+
this.getLocations().map(function (item) {
|
|
228
|
+
return item;
|
|
229
|
+
}) : [],
|
|
230
|
+
"locationRestriction": this.getLocationRestriction(),
|
|
231
|
+
"anonymousIpDetection": this.getAnonymousIpDetection(),
|
|
232
|
+
"anonymousIpRestriction": this.getAnonymousIpRestriction(),
|
|
233
|
+
"hostingProviderIpDetection": this.getHostingProviderIpDetection(),
|
|
234
|
+
"hostingProviderIpRestriction": this.getHostingProviderIpRestriction(),
|
|
235
|
+
"reputationIpDetection": this.getReputationIpDetection(),
|
|
236
|
+
"reputationIpRestriction": this.getReputationIpRestriction(),
|
|
237
|
+
"ipAddressesDetection": this.getIpAddressesDetection(),
|
|
238
|
+
"ipAddresses": this.getIpAddresses() ?
|
|
239
|
+
this.getIpAddresses().map(function (item) {
|
|
240
|
+
return item;
|
|
241
|
+
}) : [],
|
|
242
|
+
"ipAddressRestriction": this.getIpAddressRestriction(),
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
return BlockingPolicyModel;
|
|
246
|
+
}());
|
|
247
|
+
exports.default = BlockingPolicyModel;
|
|
248
|
+
//# sourceMappingURL=BlockingPolicyModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockingPolicyModel.js","sourceRoot":"","sources":["BlockingPolicyModel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH;IAAA;QACY,iBAAY,GAAkB,IAAI,CAAC;QACnC,uBAAkB,GAAgB,IAAI,CAAC;QACvC,sBAAiB,GAAgB,IAAI,CAAC;QACtC,cAAS,GAAkB,IAAI,CAAC;QAChC,wBAAmB,GAAgB,IAAI,CAAC;QACxC,yBAAoB,GAAgB,IAAI,CAAC;QACzC,2BAAsB,GAA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EAAE;YAChD,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;gBAC9B,IAAI,CAAC,YAAY,EAAG,CAAC,GAAG,CAAC,UAAC,IAAY;oBAClC,OAAO,IAAI,CAAC;gBAChB,CAAC,CACJ,CAAC,CAAC,CAAC,EAAE;YACN,qBAAqB,EAAE,IAAI,CAAC,sBAAsB,EAAE;YACpD,sBAAsB,EAAE,IAAI,CAAC,uBAAuB,EAAE;YACtD,wBAAwB,EAAE,IAAI,CAAC,yBAAyB,EAAE;YAC1D,4BAA4B,EAAE,IAAI,CAAC,6BAA6B,EAAE;YAClE,8BAA8B,EAAE,IAAI,CAAC,+BAA+B,EAAE;YACtE,uBAAuB,EAAE,IAAI,CAAC,wBAAwB,EAAE;YACxD,yBAAyB,EAAE,IAAI,CAAC,0BAA0B,EAAE;YAC5D,sBAAsB,EAAE,IAAI,CAAC,uBAAuB,EAAE;YACtD,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;gBAClC,IAAI,CAAC,cAAc,EAAG,CAAC,GAAG,CAAC,UAAC,IAAY;oBACpC,OAAO,IAAI,CAAC;gBAChB,CAAC,CACJ,CAAC,CAAC,CAAC,EAAE;YACN,sBAAsB,EAAE,IAAI,CAAC,uBAAuB,EAAE;SACzD,CAAC;IACN,CAAC;IACL,0BAAC;AAAD,CAAC,AAzOD,IAyOC"}
|
|
@@ -0,0 +1,252 @@
|
|
|
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 BlockingPolicyModel implements IModel {
|
|
20
|
+
private passServices: string[]|null = null;
|
|
21
|
+
private defaultRestriction: string|null = null;
|
|
22
|
+
private locationDetection: string|null = null;
|
|
23
|
+
private locations: string[]|null = null;
|
|
24
|
+
private locationRestriction: string|null = null;
|
|
25
|
+
private anonymousIpDetection: string|null = null;
|
|
26
|
+
private anonymousIpRestriction: string|null = null;
|
|
27
|
+
private hostingProviderIpDetection: string|null = null;
|
|
28
|
+
private hostingProviderIpRestriction: string|null = null;
|
|
29
|
+
private reputationIpDetection: string|null = null;
|
|
30
|
+
private reputationIpRestriction: string|null = null;
|
|
31
|
+
private ipAddressesDetection: string|null = null;
|
|
32
|
+
private ipAddresses: string[]|null = null;
|
|
33
|
+
private ipAddressRestriction: string|null = null;
|
|
34
|
+
public getPassServices(): string[]|null {
|
|
35
|
+
return this.passServices;
|
|
36
|
+
}
|
|
37
|
+
public setPassServices(passServices: string[]|null) {
|
|
38
|
+
this.passServices = passServices;
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
public withPassServices(passServices: string[]|null): this {
|
|
42
|
+
this.passServices = passServices;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
public getDefaultRestriction(): string|null {
|
|
46
|
+
return this.defaultRestriction;
|
|
47
|
+
}
|
|
48
|
+
public setDefaultRestriction(defaultRestriction: string|null) {
|
|
49
|
+
this.defaultRestriction = defaultRestriction;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
public withDefaultRestriction(defaultRestriction: string|null): this {
|
|
53
|
+
this.defaultRestriction = defaultRestriction;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
public getLocationDetection(): string|null {
|
|
57
|
+
return this.locationDetection;
|
|
58
|
+
}
|
|
59
|
+
public setLocationDetection(locationDetection: string|null) {
|
|
60
|
+
this.locationDetection = locationDetection;
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
public withLocationDetection(locationDetection: string|null): this {
|
|
64
|
+
this.locationDetection = locationDetection;
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
public getLocations(): string[]|null {
|
|
68
|
+
return this.locations;
|
|
69
|
+
}
|
|
70
|
+
public setLocations(locations: string[]|null) {
|
|
71
|
+
this.locations = locations;
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
public withLocations(locations: string[]|null): this {
|
|
75
|
+
this.locations = locations;
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
public getLocationRestriction(): string|null {
|
|
79
|
+
return this.locationRestriction;
|
|
80
|
+
}
|
|
81
|
+
public setLocationRestriction(locationRestriction: string|null) {
|
|
82
|
+
this.locationRestriction = locationRestriction;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
public withLocationRestriction(locationRestriction: string|null): this {
|
|
86
|
+
this.locationRestriction = locationRestriction;
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
public getAnonymousIpDetection(): string|null {
|
|
90
|
+
return this.anonymousIpDetection;
|
|
91
|
+
}
|
|
92
|
+
public setAnonymousIpDetection(anonymousIpDetection: string|null) {
|
|
93
|
+
this.anonymousIpDetection = anonymousIpDetection;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
public withAnonymousIpDetection(anonymousIpDetection: string|null): this {
|
|
97
|
+
this.anonymousIpDetection = anonymousIpDetection;
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
public getAnonymousIpRestriction(): string|null {
|
|
101
|
+
return this.anonymousIpRestriction;
|
|
102
|
+
}
|
|
103
|
+
public setAnonymousIpRestriction(anonymousIpRestriction: string|null) {
|
|
104
|
+
this.anonymousIpRestriction = anonymousIpRestriction;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
public withAnonymousIpRestriction(anonymousIpRestriction: string|null): this {
|
|
108
|
+
this.anonymousIpRestriction = anonymousIpRestriction;
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
public getHostingProviderIpDetection(): string|null {
|
|
112
|
+
return this.hostingProviderIpDetection;
|
|
113
|
+
}
|
|
114
|
+
public setHostingProviderIpDetection(hostingProviderIpDetection: string|null) {
|
|
115
|
+
this.hostingProviderIpDetection = hostingProviderIpDetection;
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
public withHostingProviderIpDetection(hostingProviderIpDetection: string|null): this {
|
|
119
|
+
this.hostingProviderIpDetection = hostingProviderIpDetection;
|
|
120
|
+
return this;
|
|
121
|
+
}
|
|
122
|
+
public getHostingProviderIpRestriction(): string|null {
|
|
123
|
+
return this.hostingProviderIpRestriction;
|
|
124
|
+
}
|
|
125
|
+
public setHostingProviderIpRestriction(hostingProviderIpRestriction: string|null) {
|
|
126
|
+
this.hostingProviderIpRestriction = hostingProviderIpRestriction;
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
public withHostingProviderIpRestriction(hostingProviderIpRestriction: string|null): this {
|
|
130
|
+
this.hostingProviderIpRestriction = hostingProviderIpRestriction;
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
public getReputationIpDetection(): string|null {
|
|
134
|
+
return this.reputationIpDetection;
|
|
135
|
+
}
|
|
136
|
+
public setReputationIpDetection(reputationIpDetection: string|null) {
|
|
137
|
+
this.reputationIpDetection = reputationIpDetection;
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
public withReputationIpDetection(reputationIpDetection: string|null): this {
|
|
141
|
+
this.reputationIpDetection = reputationIpDetection;
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
public getReputationIpRestriction(): string|null {
|
|
145
|
+
return this.reputationIpRestriction;
|
|
146
|
+
}
|
|
147
|
+
public setReputationIpRestriction(reputationIpRestriction: string|null) {
|
|
148
|
+
this.reputationIpRestriction = reputationIpRestriction;
|
|
149
|
+
return this;
|
|
150
|
+
}
|
|
151
|
+
public withReputationIpRestriction(reputationIpRestriction: string|null): this {
|
|
152
|
+
this.reputationIpRestriction = reputationIpRestriction;
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
public getIpAddressesDetection(): string|null {
|
|
156
|
+
return this.ipAddressesDetection;
|
|
157
|
+
}
|
|
158
|
+
public setIpAddressesDetection(ipAddressesDetection: string|null) {
|
|
159
|
+
this.ipAddressesDetection = ipAddressesDetection;
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
public withIpAddressesDetection(ipAddressesDetection: string|null): this {
|
|
163
|
+
this.ipAddressesDetection = ipAddressesDetection;
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
166
|
+
public getIpAddresses(): string[]|null {
|
|
167
|
+
return this.ipAddresses;
|
|
168
|
+
}
|
|
169
|
+
public setIpAddresses(ipAddresses: string[]|null) {
|
|
170
|
+
this.ipAddresses = ipAddresses;
|
|
171
|
+
return this;
|
|
172
|
+
}
|
|
173
|
+
public withIpAddresses(ipAddresses: string[]|null): this {
|
|
174
|
+
this.ipAddresses = ipAddresses;
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
public getIpAddressRestriction(): string|null {
|
|
178
|
+
return this.ipAddressRestriction;
|
|
179
|
+
}
|
|
180
|
+
public setIpAddressRestriction(ipAddressRestriction: string|null) {
|
|
181
|
+
this.ipAddressRestriction = ipAddressRestriction;
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
184
|
+
public withIpAddressRestriction(ipAddressRestriction: string|null): this {
|
|
185
|
+
this.ipAddressRestriction = ipAddressRestriction;
|
|
186
|
+
return this;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
public static fromDict(data: {[key: string]: any}): BlockingPolicyModel|null {
|
|
190
|
+
if (data == undefined || data == null) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
return new BlockingPolicyModel()
|
|
194
|
+
.withPassServices(data.passServices ?
|
|
195
|
+
data.passServices.map((item: {[key: string]: any}) => {
|
|
196
|
+
return item;
|
|
197
|
+
}
|
|
198
|
+
) : [])
|
|
199
|
+
.withDefaultRestriction(data["defaultRestriction"])
|
|
200
|
+
.withLocationDetection(data["locationDetection"])
|
|
201
|
+
.withLocations(data.locations ?
|
|
202
|
+
data.locations.map((item: {[key: string]: any}) => {
|
|
203
|
+
return item;
|
|
204
|
+
}
|
|
205
|
+
) : [])
|
|
206
|
+
.withLocationRestriction(data["locationRestriction"])
|
|
207
|
+
.withAnonymousIpDetection(data["anonymousIpDetection"])
|
|
208
|
+
.withAnonymousIpRestriction(data["anonymousIpRestriction"])
|
|
209
|
+
.withHostingProviderIpDetection(data["hostingProviderIpDetection"])
|
|
210
|
+
.withHostingProviderIpRestriction(data["hostingProviderIpRestriction"])
|
|
211
|
+
.withReputationIpDetection(data["reputationIpDetection"])
|
|
212
|
+
.withReputationIpRestriction(data["reputationIpRestriction"])
|
|
213
|
+
.withIpAddressesDetection(data["ipAddressesDetection"])
|
|
214
|
+
.withIpAddresses(data.ipAddresses ?
|
|
215
|
+
data.ipAddresses.map((item: {[key: string]: any}) => {
|
|
216
|
+
return item;
|
|
217
|
+
}
|
|
218
|
+
) : [])
|
|
219
|
+
.withIpAddressRestriction(data["ipAddressRestriction"]);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
public toDict(): {[key: string]: any} {
|
|
223
|
+
return {
|
|
224
|
+
"passServices": this.getPassServices() ?
|
|
225
|
+
this.getPassServices()!.map((item: string) => {
|
|
226
|
+
return item;
|
|
227
|
+
}
|
|
228
|
+
) : [],
|
|
229
|
+
"defaultRestriction": this.getDefaultRestriction(),
|
|
230
|
+
"locationDetection": this.getLocationDetection(),
|
|
231
|
+
"locations": this.getLocations() ?
|
|
232
|
+
this.getLocations()!.map((item: string) => {
|
|
233
|
+
return item;
|
|
234
|
+
}
|
|
235
|
+
) : [],
|
|
236
|
+
"locationRestriction": this.getLocationRestriction(),
|
|
237
|
+
"anonymousIpDetection": this.getAnonymousIpDetection(),
|
|
238
|
+
"anonymousIpRestriction": this.getAnonymousIpRestriction(),
|
|
239
|
+
"hostingProviderIpDetection": this.getHostingProviderIpDetection(),
|
|
240
|
+
"hostingProviderIpRestriction": this.getHostingProviderIpRestriction(),
|
|
241
|
+
"reputationIpDetection": this.getReputationIpDetection(),
|
|
242
|
+
"reputationIpRestriction": this.getReputationIpRestriction(),
|
|
243
|
+
"ipAddressesDetection": this.getIpAddressesDetection(),
|
|
244
|
+
"ipAddresses": this.getIpAddresses() ?
|
|
245
|
+
this.getIpAddresses()!.map((item: string) => {
|
|
246
|
+
return item;
|
|
247
|
+
}
|
|
248
|
+
) : [],
|
|
249
|
+
"ipAddressRestriction": this.getIpAddressRestriction(),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}
|