gs2 1.4.23 → 1.4.25
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/distributor/request/FreezeMasterDataByUserIdRequest.d.ts +33 -0
- package/distributor/request/FreezeMasterDataByUserIdRequest.js +109 -0
- package/distributor/request/FreezeMasterDataByUserIdRequest.js.map +1 -0
- package/distributor/request/FreezeMasterDataByUserIdRequest.ts +119 -0
- package/distributor/request/FreezeMasterDataRequest.d.ts +29 -0
- package/distributor/request/FreezeMasterDataRequest.js +95 -0
- package/distributor/request/FreezeMasterDataRequest.js.map +1 -0
- package/distributor/request/FreezeMasterDataRequest.ts +105 -0
- package/distributor/request/index.d.ts +3 -1
- package/distributor/request/index.js +5 -1
- package/distributor/request/index.js.map +1 -1
- package/distributor/request/index.ts +4 -0
- package/distributor/rest.d.ts +2 -0
- package/distributor/rest.js +65 -0
- package/distributor/rest.js.map +1 -1
- package/distributor/rest.ts +73 -0
- package/distributor/result/FreezeMasterDataByUserIdResult.d.ts +13 -0
- package/distributor/result/FreezeMasterDataByUserIdResult.js +45 -0
- package/distributor/result/FreezeMasterDataByUserIdResult.js.map +1 -0
- package/distributor/result/FreezeMasterDataByUserIdResult.ts +46 -0
- package/distributor/result/FreezeMasterDataResult.d.ts +13 -0
- package/distributor/result/FreezeMasterDataResult.js +45 -0
- package/distributor/result/FreezeMasterDataResult.js.map +1 -0
- package/distributor/result/FreezeMasterDataResult.ts +46 -0
- package/distributor/result/index.d.ts +3 -1
- package/distributor/result/index.js +5 -1
- package/distributor/result/index.js.map +1 -1
- package/distributor/result/index.ts +4 -0
- 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/index.d.ts +2 -1
- package/index.js +4 -2
- package/index.js.map +1 -1
- package/index.ts +2 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
import BlockingPolicyModel from './BlockingPolicyModel';
|
|
3
|
+
export default class Namespace implements IModel {
|
|
4
|
+
private namespaceId;
|
|
5
|
+
private name;
|
|
6
|
+
private description;
|
|
7
|
+
private blockingPolicy;
|
|
8
|
+
private createdAt;
|
|
9
|
+
private updatedAt;
|
|
10
|
+
private revision;
|
|
11
|
+
static getRegion(grn: string): string | null;
|
|
12
|
+
static getOwnerId(grn: string): string | null;
|
|
13
|
+
static getNamespaceName(grn: string): string | null;
|
|
14
|
+
static isValid(grn: string): boolean;
|
|
15
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null): string | null;
|
|
16
|
+
getNamespaceId(): string | null;
|
|
17
|
+
setNamespaceId(namespaceId: string | null): this;
|
|
18
|
+
withNamespaceId(namespaceId: string | null): this;
|
|
19
|
+
getName(): string | null;
|
|
20
|
+
setName(name: string | null): this;
|
|
21
|
+
withName(name: string | null): this;
|
|
22
|
+
getDescription(): string | null;
|
|
23
|
+
setDescription(description: string | null): this;
|
|
24
|
+
withDescription(description: string | null): this;
|
|
25
|
+
getBlockingPolicy(): BlockingPolicyModel | null;
|
|
26
|
+
setBlockingPolicy(blockingPolicy: BlockingPolicyModel | null): this;
|
|
27
|
+
withBlockingPolicy(blockingPolicy: BlockingPolicyModel | null): this;
|
|
28
|
+
getCreatedAt(): number | null;
|
|
29
|
+
setCreatedAt(createdAt: number | null): this;
|
|
30
|
+
withCreatedAt(createdAt: number | null): this;
|
|
31
|
+
getUpdatedAt(): number | null;
|
|
32
|
+
setUpdatedAt(updatedAt: number | null): this;
|
|
33
|
+
withUpdatedAt(updatedAt: number | null): this;
|
|
34
|
+
getRevision(): number | null;
|
|
35
|
+
setRevision(revision: number | null): this;
|
|
36
|
+
withRevision(revision: number | null): this;
|
|
37
|
+
static fromDict(data: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}): Namespace | null;
|
|
40
|
+
toDict(): {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
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 BlockingPolicyModel_1 = tslib_1.__importDefault(require("./BlockingPolicyModel"));
|
|
20
|
+
var grnFormat = "grn:gs2:{region}:{ownerId}:guard:{namespaceName}";
|
|
21
|
+
var Namespace = /** @class */ (function () {
|
|
22
|
+
function Namespace() {
|
|
23
|
+
this.namespaceId = null;
|
|
24
|
+
this.name = null;
|
|
25
|
+
this.description = null;
|
|
26
|
+
this.blockingPolicy = null;
|
|
27
|
+
this.createdAt = null;
|
|
28
|
+
this.updatedAt = null;
|
|
29
|
+
this.revision = null;
|
|
30
|
+
}
|
|
31
|
+
Namespace.getRegion = function (grn) {
|
|
32
|
+
var match = grn.match(grnFormat
|
|
33
|
+
.replace('{region}', '(.*)')
|
|
34
|
+
.replace('{ownerId}', '.*')
|
|
35
|
+
.replace('{namespaceName}', '.*'));
|
|
36
|
+
if (match) {
|
|
37
|
+
return match[1];
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
Namespace.getOwnerId = function (grn) {
|
|
42
|
+
var match = grn.match(grnFormat
|
|
43
|
+
.replace('{region}', '.*')
|
|
44
|
+
.replace('{ownerId}', '(.*)')
|
|
45
|
+
.replace('{namespaceName}', '.*'));
|
|
46
|
+
if (match) {
|
|
47
|
+
return match[1];
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
};
|
|
51
|
+
Namespace.getNamespaceName = function (grn) {
|
|
52
|
+
var match = grn.match(grnFormat
|
|
53
|
+
.replace('{region}', '.*')
|
|
54
|
+
.replace('{ownerId}', '.*')
|
|
55
|
+
.replace('{namespaceName}', '(.*)'));
|
|
56
|
+
if (match) {
|
|
57
|
+
return match[1];
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
};
|
|
61
|
+
Namespace.isValid = function (grn) {
|
|
62
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
};
|
|
73
|
+
Namespace.createGrn = function (region, ownerId, namespaceName) {
|
|
74
|
+
return grnFormat
|
|
75
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
76
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
77
|
+
.replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '');
|
|
78
|
+
};
|
|
79
|
+
Namespace.prototype.getNamespaceId = function () {
|
|
80
|
+
return this.namespaceId;
|
|
81
|
+
};
|
|
82
|
+
Namespace.prototype.setNamespaceId = function (namespaceId) {
|
|
83
|
+
this.namespaceId = namespaceId;
|
|
84
|
+
return this;
|
|
85
|
+
};
|
|
86
|
+
Namespace.prototype.withNamespaceId = function (namespaceId) {
|
|
87
|
+
this.namespaceId = namespaceId;
|
|
88
|
+
return this;
|
|
89
|
+
};
|
|
90
|
+
Namespace.prototype.getName = function () {
|
|
91
|
+
return this.name;
|
|
92
|
+
};
|
|
93
|
+
Namespace.prototype.setName = function (name) {
|
|
94
|
+
this.name = name;
|
|
95
|
+
return this;
|
|
96
|
+
};
|
|
97
|
+
Namespace.prototype.withName = function (name) {
|
|
98
|
+
this.name = name;
|
|
99
|
+
return this;
|
|
100
|
+
};
|
|
101
|
+
Namespace.prototype.getDescription = function () {
|
|
102
|
+
return this.description;
|
|
103
|
+
};
|
|
104
|
+
Namespace.prototype.setDescription = function (description) {
|
|
105
|
+
this.description = description;
|
|
106
|
+
return this;
|
|
107
|
+
};
|
|
108
|
+
Namespace.prototype.withDescription = function (description) {
|
|
109
|
+
this.description = description;
|
|
110
|
+
return this;
|
|
111
|
+
};
|
|
112
|
+
Namespace.prototype.getBlockingPolicy = function () {
|
|
113
|
+
return this.blockingPolicy;
|
|
114
|
+
};
|
|
115
|
+
Namespace.prototype.setBlockingPolicy = function (blockingPolicy) {
|
|
116
|
+
this.blockingPolicy = blockingPolicy;
|
|
117
|
+
return this;
|
|
118
|
+
};
|
|
119
|
+
Namespace.prototype.withBlockingPolicy = function (blockingPolicy) {
|
|
120
|
+
this.blockingPolicy = blockingPolicy;
|
|
121
|
+
return this;
|
|
122
|
+
};
|
|
123
|
+
Namespace.prototype.getCreatedAt = function () {
|
|
124
|
+
return this.createdAt;
|
|
125
|
+
};
|
|
126
|
+
Namespace.prototype.setCreatedAt = function (createdAt) {
|
|
127
|
+
this.createdAt = createdAt;
|
|
128
|
+
return this;
|
|
129
|
+
};
|
|
130
|
+
Namespace.prototype.withCreatedAt = function (createdAt) {
|
|
131
|
+
this.createdAt = createdAt;
|
|
132
|
+
return this;
|
|
133
|
+
};
|
|
134
|
+
Namespace.prototype.getUpdatedAt = function () {
|
|
135
|
+
return this.updatedAt;
|
|
136
|
+
};
|
|
137
|
+
Namespace.prototype.setUpdatedAt = function (updatedAt) {
|
|
138
|
+
this.updatedAt = updatedAt;
|
|
139
|
+
return this;
|
|
140
|
+
};
|
|
141
|
+
Namespace.prototype.withUpdatedAt = function (updatedAt) {
|
|
142
|
+
this.updatedAt = updatedAt;
|
|
143
|
+
return this;
|
|
144
|
+
};
|
|
145
|
+
Namespace.prototype.getRevision = function () {
|
|
146
|
+
return this.revision;
|
|
147
|
+
};
|
|
148
|
+
Namespace.prototype.setRevision = function (revision) {
|
|
149
|
+
this.revision = revision;
|
|
150
|
+
return this;
|
|
151
|
+
};
|
|
152
|
+
Namespace.prototype.withRevision = function (revision) {
|
|
153
|
+
this.revision = revision;
|
|
154
|
+
return this;
|
|
155
|
+
};
|
|
156
|
+
Namespace.fromDict = function (data) {
|
|
157
|
+
if (data == undefined || data == null) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
return new Namespace()
|
|
161
|
+
.withNamespaceId(data["namespaceId"])
|
|
162
|
+
.withName(data["name"])
|
|
163
|
+
.withDescription(data["description"])
|
|
164
|
+
.withBlockingPolicy(BlockingPolicyModel_1.default.fromDict(data["blockingPolicy"]))
|
|
165
|
+
.withCreatedAt(data["createdAt"])
|
|
166
|
+
.withUpdatedAt(data["updatedAt"])
|
|
167
|
+
.withRevision(data["revision"]);
|
|
168
|
+
};
|
|
169
|
+
Namespace.prototype.toDict = function () {
|
|
170
|
+
var _a;
|
|
171
|
+
return {
|
|
172
|
+
"namespaceId": this.getNamespaceId(),
|
|
173
|
+
"name": this.getName(),
|
|
174
|
+
"description": this.getDescription(),
|
|
175
|
+
"blockingPolicy": (_a = this.getBlockingPolicy()) === null || _a === void 0 ? void 0 : _a.toDict(),
|
|
176
|
+
"createdAt": this.getCreatedAt(),
|
|
177
|
+
"updatedAt": this.getUpdatedAt(),
|
|
178
|
+
"revision": this.getRevision(),
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
return Namespace;
|
|
182
|
+
}());
|
|
183
|
+
exports.default = Namespace;
|
|
184
|
+
//# sourceMappingURL=Namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Namespace.js","sourceRoot":"","sources":["Namespace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,sFAAwD;AACxD,IAAM,SAAS,GAAW,kDAAkD,CAAC;AAE7E;IAAA;QACY,gBAAW,GAAgB,IAAI,CAAC;QAChC,SAAI,GAAgB,IAAI,CAAC;QACzB,gBAAW,GAAgB,IAAI,CAAC;QAChC,mBAAc,GAA6B,IAAI,CAAC;QAChD,cAAS,GAAgB,IAAI,CAAC;QAC9B,cAAS,GAAgB,IAAI,CAAC;QAC9B,aAAQ,GAAgB,IAAI,CAAC;IAoKzC,CAAC;IAlKiB,mBAAS,GAAvB,UAAwB,GAAW;QAC/B,IAAM,KAAK,GAAG,GAAG,CAAC,KAA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|
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 BlockingPolicyModel from './BlockingPolicyModel';
|
|
19
|
+
const grnFormat: string = "grn:gs2:{region}:{ownerId}:guard:{namespaceName}";
|
|
20
|
+
|
|
21
|
+
export default class Namespace implements IModel {
|
|
22
|
+
private namespaceId: string|null = null;
|
|
23
|
+
private name: string|null = null;
|
|
24
|
+
private description: string|null = null;
|
|
25
|
+
private blockingPolicy: BlockingPolicyModel|null = null;
|
|
26
|
+
private createdAt: number|null = null;
|
|
27
|
+
private updatedAt: number|null = null;
|
|
28
|
+
private revision: number|null = null;
|
|
29
|
+
|
|
30
|
+
public static getRegion(grn: string): string|null {
|
|
31
|
+
const match = grn.match(grnFormat
|
|
32
|
+
.replace('{region}', '(.*)')
|
|
33
|
+
.replace('{ownerId}', '.*')
|
|
34
|
+
.replace('{namespaceName}', '.*')
|
|
35
|
+
);
|
|
36
|
+
if (match) {
|
|
37
|
+
return match[1];
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public static getOwnerId(grn: string): string|null {
|
|
43
|
+
const match = grn.match(grnFormat
|
|
44
|
+
.replace('{region}', '.*')
|
|
45
|
+
.replace('{ownerId}', '(.*)')
|
|
46
|
+
.replace('{namespaceName}', '.*')
|
|
47
|
+
);
|
|
48
|
+
if (match) {
|
|
49
|
+
return match[1];
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public static getNamespaceName(grn: string): string|null {
|
|
55
|
+
const match = grn.match(grnFormat
|
|
56
|
+
.replace('{region}', '.*')
|
|
57
|
+
.replace('{ownerId}', '.*')
|
|
58
|
+
.replace('{namespaceName}', '(.*)')
|
|
59
|
+
);
|
|
60
|
+
if (match) {
|
|
61
|
+
return match[1];
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public static isValid(grn: string): boolean {
|
|
67
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public static createGrn(
|
|
80
|
+
region: string|null,
|
|
81
|
+
ownerId: string|null,
|
|
82
|
+
namespaceName: string|null,
|
|
83
|
+
): string|null {
|
|
84
|
+
return grnFormat
|
|
85
|
+
.replace('{region}', region ?? '')
|
|
86
|
+
.replace('{ownerId}', ownerId ?? '')
|
|
87
|
+
.replace('{namespaceName}', namespaceName ?? '');
|
|
88
|
+
}
|
|
89
|
+
public getNamespaceId(): string|null {
|
|
90
|
+
return this.namespaceId;
|
|
91
|
+
}
|
|
92
|
+
public setNamespaceId(namespaceId: string|null) {
|
|
93
|
+
this.namespaceId = namespaceId;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
public withNamespaceId(namespaceId: string|null): this {
|
|
97
|
+
this.namespaceId = namespaceId;
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
public getName(): string|null {
|
|
101
|
+
return this.name;
|
|
102
|
+
}
|
|
103
|
+
public setName(name: string|null) {
|
|
104
|
+
this.name = name;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
public withName(name: string|null): this {
|
|
108
|
+
this.name = name;
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
public getDescription(): string|null {
|
|
112
|
+
return this.description;
|
|
113
|
+
}
|
|
114
|
+
public setDescription(description: string|null) {
|
|
115
|
+
this.description = description;
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
public withDescription(description: string|null): this {
|
|
119
|
+
this.description = description;
|
|
120
|
+
return this;
|
|
121
|
+
}
|
|
122
|
+
public getBlockingPolicy(): BlockingPolicyModel|null {
|
|
123
|
+
return this.blockingPolicy;
|
|
124
|
+
}
|
|
125
|
+
public setBlockingPolicy(blockingPolicy: BlockingPolicyModel|null) {
|
|
126
|
+
this.blockingPolicy = blockingPolicy;
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
public withBlockingPolicy(blockingPolicy: BlockingPolicyModel|null): this {
|
|
130
|
+
this.blockingPolicy = blockingPolicy;
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
public getCreatedAt(): number|null {
|
|
134
|
+
return this.createdAt;
|
|
135
|
+
}
|
|
136
|
+
public setCreatedAt(createdAt: number|null) {
|
|
137
|
+
this.createdAt = createdAt;
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
public withCreatedAt(createdAt: number|null): this {
|
|
141
|
+
this.createdAt = createdAt;
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
public getUpdatedAt(): number|null {
|
|
145
|
+
return this.updatedAt;
|
|
146
|
+
}
|
|
147
|
+
public setUpdatedAt(updatedAt: number|null) {
|
|
148
|
+
this.updatedAt = updatedAt;
|
|
149
|
+
return this;
|
|
150
|
+
}
|
|
151
|
+
public withUpdatedAt(updatedAt: number|null): this {
|
|
152
|
+
this.updatedAt = updatedAt;
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
public getRevision(): number|null {
|
|
156
|
+
return this.revision;
|
|
157
|
+
}
|
|
158
|
+
public setRevision(revision: number|null) {
|
|
159
|
+
this.revision = revision;
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
public withRevision(revision: number|null): this {
|
|
163
|
+
this.revision = revision;
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public static fromDict(data: {[key: string]: any}): Namespace|null {
|
|
168
|
+
if (data == undefined || data == null) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
return new Namespace()
|
|
172
|
+
.withNamespaceId(data["namespaceId"])
|
|
173
|
+
.withName(data["name"])
|
|
174
|
+
.withDescription(data["description"])
|
|
175
|
+
.withBlockingPolicy(BlockingPolicyModel.fromDict(data["blockingPolicy"]))
|
|
176
|
+
.withCreatedAt(data["createdAt"])
|
|
177
|
+
.withUpdatedAt(data["updatedAt"])
|
|
178
|
+
.withRevision(data["revision"]);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
public toDict(): {[key: string]: any} {
|
|
182
|
+
return {
|
|
183
|
+
"namespaceId": this.getNamespaceId(),
|
|
184
|
+
"name": this.getName(),
|
|
185
|
+
"description": this.getDescription(),
|
|
186
|
+
"blockingPolicy": this.getBlockingPolicy()?.toDict(),
|
|
187
|
+
"createdAt": this.getCreatedAt(),
|
|
188
|
+
"updatedAt": this.getUpdatedAt(),
|
|
189
|
+
"revision": this.getRevision(),
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
}
|