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
package/guard/rest.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AbstractGs2RestClient from '../core/AbstractGs2RestClient';
|
|
2
|
+
import { Gs2RestSession } from '../core/model';
|
|
3
|
+
import * as Request from './request';
|
|
4
|
+
import * as Result from './result';
|
|
5
|
+
export default class Gs2GuardRestClient extends AbstractGs2RestClient {
|
|
6
|
+
constructor(session: Gs2RestSession);
|
|
7
|
+
describeNamespaces(request: Request.DescribeNamespacesRequest): Promise<Result.DescribeNamespacesResult>;
|
|
8
|
+
createNamespace(request: Request.CreateNamespaceRequest): Promise<Result.CreateNamespaceResult>;
|
|
9
|
+
getNamespaceStatus(request: Request.GetNamespaceStatusRequest): Promise<Result.GetNamespaceStatusResult>;
|
|
10
|
+
getNamespace(request: Request.GetNamespaceRequest): Promise<Result.GetNamespaceResult>;
|
|
11
|
+
updateNamespace(request: Request.UpdateNamespaceRequest): Promise<Result.UpdateNamespaceResult>;
|
|
12
|
+
deleteNamespace(request: Request.DeleteNamespaceRequest): Promise<Result.DeleteNamespaceResult>;
|
|
13
|
+
}
|
package/guard/rest.js
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
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 AbstractGs2RestClient_1 = tslib_1.__importDefault(require("../core/AbstractGs2RestClient"));
|
|
20
|
+
var model_1 = require("../core/model");
|
|
21
|
+
var Result = tslib_1.__importStar(require("./result"));
|
|
22
|
+
var axios_1 = tslib_1.__importDefault(require("axios"));
|
|
23
|
+
var Gs2GuardRestClient = /** @class */ (function (_super) {
|
|
24
|
+
tslib_1.__extends(Gs2GuardRestClient, _super);
|
|
25
|
+
function Gs2GuardRestClient(session) {
|
|
26
|
+
return _super.call(this, session) || this;
|
|
27
|
+
}
|
|
28
|
+
Gs2GuardRestClient.prototype.describeNamespaces = function (request) {
|
|
29
|
+
var _a, _b, _c;
|
|
30
|
+
var url = (model_1.Gs2Constant.ENDPOINT_HOST + '/')
|
|
31
|
+
.replace('{service}', 'guard')
|
|
32
|
+
.replace('{region}', this.session.region);
|
|
33
|
+
var headers = this.createAuthorizedHeaders();
|
|
34
|
+
if (request.getRequestId()) {
|
|
35
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
36
|
+
}
|
|
37
|
+
var params = {
|
|
38
|
+
'contextStack': (_a = request.getContextStack()) !== null && _a !== void 0 ? _a : null,
|
|
39
|
+
'pageToken': String((_b = request.getPageToken()) !== null && _b !== void 0 ? _b : null),
|
|
40
|
+
'limit': String((_c = request.getLimit()) !== null && _c !== void 0 ? _c : null),
|
|
41
|
+
};
|
|
42
|
+
return axios_1.default.get(url, {
|
|
43
|
+
params: params,
|
|
44
|
+
headers: headers,
|
|
45
|
+
}).then(function (response) {
|
|
46
|
+
return Result.DescribeNamespacesResult.fromDict(response.data);
|
|
47
|
+
}).catch(function (error) {
|
|
48
|
+
throw JSON.parse(error.response.data.message);
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
Gs2GuardRestClient.prototype.createNamespace = function (request) {
|
|
52
|
+
var _a, _b, _c, _d, _e;
|
|
53
|
+
var url = (model_1.Gs2Constant.ENDPOINT_HOST + '/')
|
|
54
|
+
.replace('{service}', 'guard')
|
|
55
|
+
.replace('{region}', this.session.region);
|
|
56
|
+
var headers = this.createAuthorizedHeaders();
|
|
57
|
+
if (request.getRequestId()) {
|
|
58
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
59
|
+
}
|
|
60
|
+
var body = {
|
|
61
|
+
'contextStack': (_a = request.getContextStack()) !== null && _a !== void 0 ? _a : null,
|
|
62
|
+
'name': (_b = request.getName()) !== null && _b !== void 0 ? _b : null,
|
|
63
|
+
'description': (_c = request.getDescription()) !== null && _c !== void 0 ? _c : null,
|
|
64
|
+
'blockingPolicy': (_e = (_d = request.getBlockingPolicy()) === null || _d === void 0 ? void 0 : _d.toDict()) !== null && _e !== void 0 ? _e : null,
|
|
65
|
+
};
|
|
66
|
+
return axios_1.default.post(url, body, {
|
|
67
|
+
headers: headers,
|
|
68
|
+
}).then(function (response) {
|
|
69
|
+
return Result.CreateNamespaceResult.fromDict(response.data);
|
|
70
|
+
}).catch(function (error) {
|
|
71
|
+
if (error.response) {
|
|
72
|
+
throw JSON.parse(error.response.data.message);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
throw [];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
Gs2GuardRestClient.prototype.getNamespaceStatus = function (request) {
|
|
80
|
+
var _a, _b, _c;
|
|
81
|
+
var url = (model_1.Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/status')
|
|
82
|
+
.replace('{service}', 'guard')
|
|
83
|
+
.replace('{region}', this.session.region)
|
|
84
|
+
.replace('{namespaceName}', String((_a = request.getNamespaceName()) !== null && _a !== void 0 ? _a : 'null') === "" ? "null" : String((_b = request.getNamespaceName()) !== null && _b !== void 0 ? _b : 'null'));
|
|
85
|
+
var headers = this.createAuthorizedHeaders();
|
|
86
|
+
if (request.getRequestId()) {
|
|
87
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
88
|
+
}
|
|
89
|
+
var params = {
|
|
90
|
+
'contextStack': (_c = request.getContextStack()) !== null && _c !== void 0 ? _c : null,
|
|
91
|
+
};
|
|
92
|
+
return axios_1.default.get(url, {
|
|
93
|
+
params: params,
|
|
94
|
+
headers: headers,
|
|
95
|
+
}).then(function (response) {
|
|
96
|
+
return Result.GetNamespaceStatusResult.fromDict(response.data);
|
|
97
|
+
}).catch(function (error) {
|
|
98
|
+
throw JSON.parse(error.response.data.message);
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
Gs2GuardRestClient.prototype.getNamespace = function (request) {
|
|
102
|
+
var _a, _b, _c;
|
|
103
|
+
var url = (model_1.Gs2Constant.ENDPOINT_HOST + '/{namespaceName}')
|
|
104
|
+
.replace('{service}', 'guard')
|
|
105
|
+
.replace('{region}', this.session.region)
|
|
106
|
+
.replace('{namespaceName}', String((_a = request.getNamespaceName()) !== null && _a !== void 0 ? _a : 'null') === "" ? "null" : String((_b = request.getNamespaceName()) !== null && _b !== void 0 ? _b : 'null'));
|
|
107
|
+
var headers = this.createAuthorizedHeaders();
|
|
108
|
+
if (request.getRequestId()) {
|
|
109
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
110
|
+
}
|
|
111
|
+
var params = {
|
|
112
|
+
'contextStack': (_c = request.getContextStack()) !== null && _c !== void 0 ? _c : null,
|
|
113
|
+
};
|
|
114
|
+
return axios_1.default.get(url, {
|
|
115
|
+
params: params,
|
|
116
|
+
headers: headers,
|
|
117
|
+
}).then(function (response) {
|
|
118
|
+
return Result.GetNamespaceResult.fromDict(response.data);
|
|
119
|
+
}).catch(function (error) {
|
|
120
|
+
throw JSON.parse(error.response.data.message);
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
Gs2GuardRestClient.prototype.updateNamespace = function (request) {
|
|
124
|
+
var _a, _b, _c, _d, _e, _f;
|
|
125
|
+
var url = (model_1.Gs2Constant.ENDPOINT_HOST + '/{namespaceName}')
|
|
126
|
+
.replace('{service}', 'guard')
|
|
127
|
+
.replace('{region}', this.session.region)
|
|
128
|
+
.replace('{namespaceName}', String((_a = request.getNamespaceName()) !== null && _a !== void 0 ? _a : 'null') === "" ? "null" : String((_b = request.getNamespaceName()) !== null && _b !== void 0 ? _b : 'null'));
|
|
129
|
+
var headers = this.createAuthorizedHeaders();
|
|
130
|
+
if (request.getRequestId()) {
|
|
131
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
132
|
+
}
|
|
133
|
+
var body = {
|
|
134
|
+
'contextStack': (_c = request.getContextStack()) !== null && _c !== void 0 ? _c : null,
|
|
135
|
+
'description': (_d = request.getDescription()) !== null && _d !== void 0 ? _d : null,
|
|
136
|
+
'blockingPolicy': (_f = (_e = request.getBlockingPolicy()) === null || _e === void 0 ? void 0 : _e.toDict()) !== null && _f !== void 0 ? _f : null,
|
|
137
|
+
};
|
|
138
|
+
return axios_1.default.put(url, body, {
|
|
139
|
+
headers: headers,
|
|
140
|
+
}).then(function (response) {
|
|
141
|
+
return Result.UpdateNamespaceResult.fromDict(response.data);
|
|
142
|
+
}).catch(function (error) {
|
|
143
|
+
if (error.response) {
|
|
144
|
+
throw JSON.parse(error.response.data.message);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
throw [];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
Gs2GuardRestClient.prototype.deleteNamespace = function (request) {
|
|
152
|
+
var _a, _b, _c;
|
|
153
|
+
var url = (model_1.Gs2Constant.ENDPOINT_HOST + '/{namespaceName}')
|
|
154
|
+
.replace('{service}', 'guard')
|
|
155
|
+
.replace('{region}', this.session.region)
|
|
156
|
+
.replace('{namespaceName}', String((_a = request.getNamespaceName()) !== null && _a !== void 0 ? _a : 'null') === "" ? "null" : String((_b = request.getNamespaceName()) !== null && _b !== void 0 ? _b : 'null'));
|
|
157
|
+
var headers = this.createAuthorizedHeaders();
|
|
158
|
+
if (request.getRequestId()) {
|
|
159
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
160
|
+
}
|
|
161
|
+
var params = {
|
|
162
|
+
'contextStack': (_c = request.getContextStack()) !== null && _c !== void 0 ? _c : null,
|
|
163
|
+
};
|
|
164
|
+
return axios_1.default.delete(url, {
|
|
165
|
+
params: params,
|
|
166
|
+
headers: headers,
|
|
167
|
+
}).then(function (response) {
|
|
168
|
+
return Result.DeleteNamespaceResult.fromDict(response.data);
|
|
169
|
+
}).catch(function (error) {
|
|
170
|
+
throw JSON.parse(error.response.data.message);
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
return Gs2GuardRestClient;
|
|
174
|
+
}(AbstractGs2RestClient_1.default));
|
|
175
|
+
exports.default = Gs2GuardRestClient;
|
|
176
|
+
//# sourceMappingURL=rest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.js","sourceRoot":"","sources":["rest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gGAAkE;AAClE,uCAA4D;AAE5D,uDAAmC;AAEnC,wDAA0B;AAE1B;IAAgD,8CAAqB;IAEjE,4BAAY,OAAuB;eAC/B,kBAAM,OAAO,CAAC;IAClB,CAAC;IAEM,+CAAkB,GAAzB,UAA0B,OAA0C;;QAChE,IAAM,GAAG,GAAG,CAAC,mBAAW,CAAC,aAAa,GAAG,GAAG,CAAC;aACxC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC;aAC7B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAM,OAAO,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/C,IAAI,OAAO,CAAC,YAAY,EAAE,EAAE;YACxB,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;SACxD;QACD,IAAM,MAAM,GAAyB;YACjC,cAAc,EAAE,MAAA,OAAO,CAAC,eAAe,EAAE,mCAAI,IAAI;YACjD,WAAW,EAAE,MAAM,CAAC,MAAA,OAAO,CAAC,YAAY,EAAE,mCAAI,IAAI,CAAC;YACnD,OAAO,EAAE,MAAM,CAAC,MAAA,OAAO,CAAC,QAAQ,EAAE,mCAAI,IAAI,CAAC;SAC9C,CAAC;QACF,OAAO,eAAK,CAAC,GAAG,CACZ,GAAG,EACF;YACG,MAAM,QAAA;YACN,OAAO,SAAA;SACV,CACJ,CAAC,IAAI,CAAC,UAAC,QAAa;YACjB,OAAO,M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, 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 AbstractGs2RestClient from '../core/AbstractGs2RestClient';
|
|
18
|
+
import { Gs2Constant, Gs2RestSession } from '../core/model';
|
|
19
|
+
import * as Request from './request';
|
|
20
|
+
import * as Result from './result';
|
|
21
|
+
|
|
22
|
+
import axios from 'axios';
|
|
23
|
+
|
|
24
|
+
export default class Gs2GuardRestClient extends AbstractGs2RestClient {
|
|
25
|
+
|
|
26
|
+
constructor(session: Gs2RestSession) {
|
|
27
|
+
super(session);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public describeNamespaces(request: Request.DescribeNamespacesRequest): Promise<Result.DescribeNamespacesResult> {
|
|
31
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/')
|
|
32
|
+
.replace('{service}', 'guard')
|
|
33
|
+
.replace('{region}', this.session.region);
|
|
34
|
+
|
|
35
|
+
const headers = this.createAuthorizedHeaders();
|
|
36
|
+
if (request.getRequestId()) {
|
|
37
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
38
|
+
}
|
|
39
|
+
const params: {[key: string]: any} = {
|
|
40
|
+
'contextStack': request.getContextStack() ?? null,
|
|
41
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
42
|
+
'limit': String(request.getLimit() ?? null),
|
|
43
|
+
};
|
|
44
|
+
return axios.get(
|
|
45
|
+
url,
|
|
46
|
+
{
|
|
47
|
+
params,
|
|
48
|
+
headers,
|
|
49
|
+
},
|
|
50
|
+
).then((response: any) => {
|
|
51
|
+
return Result.DescribeNamespacesResult.fromDict(response.data);
|
|
52
|
+
}).catch((error: any) => {
|
|
53
|
+
throw JSON.parse(error.response.data.message);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public createNamespace(request: Request.CreateNamespaceRequest): Promise<Result.CreateNamespaceResult> {
|
|
58
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/')
|
|
59
|
+
.replace('{service}', 'guard')
|
|
60
|
+
.replace('{region}', this.session.region);
|
|
61
|
+
|
|
62
|
+
const headers = this.createAuthorizedHeaders();
|
|
63
|
+
if (request.getRequestId()) {
|
|
64
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
65
|
+
}
|
|
66
|
+
const body: {[key: string]: any} = {
|
|
67
|
+
'contextStack': request.getContextStack() ?? null,
|
|
68
|
+
'name': request.getName() ?? null,
|
|
69
|
+
'description': request.getDescription() ?? null,
|
|
70
|
+
'blockingPolicy': request.getBlockingPolicy()?.toDict() ?? null,
|
|
71
|
+
};
|
|
72
|
+
return axios.post(
|
|
73
|
+
url,
|
|
74
|
+
body,
|
|
75
|
+
{
|
|
76
|
+
headers,
|
|
77
|
+
},
|
|
78
|
+
).then((response: any) => {
|
|
79
|
+
return Result.CreateNamespaceResult.fromDict(response.data);
|
|
80
|
+
}).catch((error: any) => {
|
|
81
|
+
if (error.response) {
|
|
82
|
+
throw JSON.parse(error.response.data.message);
|
|
83
|
+
} else {
|
|
84
|
+
throw [];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public getNamespaceStatus(request: Request.GetNamespaceStatusRequest): Promise<Result.GetNamespaceStatusResult> {
|
|
90
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/status')
|
|
91
|
+
.replace('{service}', 'guard')
|
|
92
|
+
.replace('{region}', this.session.region)
|
|
93
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
94
|
+
|
|
95
|
+
const headers = this.createAuthorizedHeaders();
|
|
96
|
+
if (request.getRequestId()) {
|
|
97
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
98
|
+
}
|
|
99
|
+
const params: {[key: string]: any} = {
|
|
100
|
+
'contextStack': request.getContextStack() ?? null,
|
|
101
|
+
};
|
|
102
|
+
return axios.get(
|
|
103
|
+
url,
|
|
104
|
+
{
|
|
105
|
+
params,
|
|
106
|
+
headers,
|
|
107
|
+
},
|
|
108
|
+
).then((response: any) => {
|
|
109
|
+
return Result.GetNamespaceStatusResult.fromDict(response.data);
|
|
110
|
+
}).catch((error: any) => {
|
|
111
|
+
throw JSON.parse(error.response.data.message);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public getNamespace(request: Request.GetNamespaceRequest): Promise<Result.GetNamespaceResult> {
|
|
116
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}')
|
|
117
|
+
.replace('{service}', 'guard')
|
|
118
|
+
.replace('{region}', this.session.region)
|
|
119
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
120
|
+
|
|
121
|
+
const headers = this.createAuthorizedHeaders();
|
|
122
|
+
if (request.getRequestId()) {
|
|
123
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
124
|
+
}
|
|
125
|
+
const params: {[key: string]: any} = {
|
|
126
|
+
'contextStack': request.getContextStack() ?? null,
|
|
127
|
+
};
|
|
128
|
+
return axios.get(
|
|
129
|
+
url,
|
|
130
|
+
{
|
|
131
|
+
params,
|
|
132
|
+
headers,
|
|
133
|
+
},
|
|
134
|
+
).then((response: any) => {
|
|
135
|
+
return Result.GetNamespaceResult.fromDict(response.data);
|
|
136
|
+
}).catch((error: any) => {
|
|
137
|
+
throw JSON.parse(error.response.data.message);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
public updateNamespace(request: Request.UpdateNamespaceRequest): Promise<Result.UpdateNamespaceResult> {
|
|
142
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}')
|
|
143
|
+
.replace('{service}', 'guard')
|
|
144
|
+
.replace('{region}', this.session.region)
|
|
145
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
146
|
+
|
|
147
|
+
const headers = this.createAuthorizedHeaders();
|
|
148
|
+
if (request.getRequestId()) {
|
|
149
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
150
|
+
}
|
|
151
|
+
const body: {[key: string]: any} = {
|
|
152
|
+
'contextStack': request.getContextStack() ?? null,
|
|
153
|
+
'description': request.getDescription() ?? null,
|
|
154
|
+
'blockingPolicy': request.getBlockingPolicy()?.toDict() ?? null,
|
|
155
|
+
};
|
|
156
|
+
return axios.put(
|
|
157
|
+
url,
|
|
158
|
+
body,
|
|
159
|
+
{
|
|
160
|
+
headers,
|
|
161
|
+
},
|
|
162
|
+
).then((response: any) => {
|
|
163
|
+
return Result.UpdateNamespaceResult.fromDict(response.data);
|
|
164
|
+
}).catch((error: any) => {
|
|
165
|
+
if (error.response) {
|
|
166
|
+
throw JSON.parse(error.response.data.message);
|
|
167
|
+
} else {
|
|
168
|
+
throw [];
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
public deleteNamespace(request: Request.DeleteNamespaceRequest): Promise<Result.DeleteNamespaceResult> {
|
|
174
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}')
|
|
175
|
+
.replace('{service}', 'guard')
|
|
176
|
+
.replace('{region}', this.session.region)
|
|
177
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
178
|
+
|
|
179
|
+
const headers = this.createAuthorizedHeaders();
|
|
180
|
+
if (request.getRequestId()) {
|
|
181
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
182
|
+
}
|
|
183
|
+
const params: {[key: string]: any} = {
|
|
184
|
+
'contextStack': request.getContextStack() ?? null,
|
|
185
|
+
};
|
|
186
|
+
return axios.delete(
|
|
187
|
+
url,
|
|
188
|
+
{
|
|
189
|
+
params,
|
|
190
|
+
headers,
|
|
191
|
+
},
|
|
192
|
+
).then((response: any) => {
|
|
193
|
+
return Result.DeleteNamespaceResult.fromDict(response.data);
|
|
194
|
+
}).catch((error: any) => {
|
|
195
|
+
throw JSON.parse(error.response.data.message);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import IResult from '../../core/interface/IResult';
|
|
2
|
+
import * as Gs2Guard from '../model';
|
|
3
|
+
export default class CreateNamespaceResult implements IResult {
|
|
4
|
+
private item;
|
|
5
|
+
getItem(): Gs2Guard.Namespace | null;
|
|
6
|
+
setItem(item: Gs2Guard.Namespace | null): this;
|
|
7
|
+
withItem(item: Gs2Guard.Namespace | null): this;
|
|
8
|
+
static fromDict(data: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}): CreateNamespaceResult;
|
|
11
|
+
toDict(): {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 Gs2Guard = tslib_1.__importStar(require("../model"));
|
|
20
|
+
var CreateNamespaceResult = /** @class */ (function () {
|
|
21
|
+
function CreateNamespaceResult() {
|
|
22
|
+
this.item = null;
|
|
23
|
+
}
|
|
24
|
+
CreateNamespaceResult.prototype.getItem = function () {
|
|
25
|
+
return this.item;
|
|
26
|
+
};
|
|
27
|
+
CreateNamespaceResult.prototype.setItem = function (item) {
|
|
28
|
+
this.item = item;
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
CreateNamespaceResult.prototype.withItem = function (item) {
|
|
32
|
+
this.item = item;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
CreateNamespaceResult.fromDict = function (data) {
|
|
36
|
+
return new CreateNamespaceResult()
|
|
37
|
+
.withItem(Gs2Guard.Namespace.fromDict(data["item"]));
|
|
38
|
+
};
|
|
39
|
+
CreateNamespaceResult.prototype.toDict = function () {
|
|
40
|
+
var _a;
|
|
41
|
+
return {
|
|
42
|
+
"item": (_a = this.getItem()) === null || _a === void 0 ? void 0 : _a.toDict(),
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
return CreateNamespaceResult;
|
|
46
|
+
}());
|
|
47
|
+
exports.default = CreateNamespaceResult;
|
|
48
|
+
//# sourceMappingURL=CreateNamespaceResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateNamespaceResult.js","sourceRoot":"","sources":["CreateNamespaceResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,yDAAoC;AAEpC;IAAA;QACY,SAAI,GAA4B,IAAI,CAAC;IA0BjD,CAAC;IAxBU,uCAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,uCAAO,GAAd,UAAe,IAA6B;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,wCAAQ,GAAf,UAAgB,IAA6B;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,8BAAQ,GAAtB,UAAuB,IAA0B;QAC7C,OAAO,IAAI,qBAAqB,EAAE;aAC7B,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEM,sCAAM,GAAb;;QACI,OAAO;YACH,MAAM,EAAE,MAAA,IAAI,CAAC,OAAO,EAAE,0CAAE,MAAM,EAAE;SACnC,CAAC;IACN,CAAC;IACL,4BAAC;AAAD,CAAC,AA3BD,IA2BC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 IResult from '../../core/interface/IResult';
|
|
18
|
+
import * as Gs2Guard from '../model'
|
|
19
|
+
|
|
20
|
+
export default class CreateNamespaceResult implements IResult {
|
|
21
|
+
private item: Gs2Guard.Namespace|null = null;
|
|
22
|
+
|
|
23
|
+
public getItem(): Gs2Guard.Namespace|null {
|
|
24
|
+
return this.item;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public setItem(item: Gs2Guard.Namespace|null) {
|
|
28
|
+
this.item = item;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public withItem(item: Gs2Guard.Namespace|null): this {
|
|
33
|
+
this.item = item;
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public static fromDict(data: {[key: string]: any}): CreateNamespaceResult {
|
|
38
|
+
return new CreateNamespaceResult()
|
|
39
|
+
.withItem(Gs2Guard.Namespace.fromDict(data["item"]));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public toDict(): {[key: string]: any} {
|
|
43
|
+
return {
|
|
44
|
+
"item": this.getItem()?.toDict(),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import IResult from '../../core/interface/IResult';
|
|
2
|
+
import * as Gs2Guard from '../model';
|
|
3
|
+
export default class DeleteNamespaceResult implements IResult {
|
|
4
|
+
private item;
|
|
5
|
+
getItem(): Gs2Guard.Namespace | null;
|
|
6
|
+
setItem(item: Gs2Guard.Namespace | null): this;
|
|
7
|
+
withItem(item: Gs2Guard.Namespace | null): this;
|
|
8
|
+
static fromDict(data: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}): DeleteNamespaceResult;
|
|
11
|
+
toDict(): {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 Gs2Guard = tslib_1.__importStar(require("../model"));
|
|
20
|
+
var DeleteNamespaceResult = /** @class */ (function () {
|
|
21
|
+
function DeleteNamespaceResult() {
|
|
22
|
+
this.item = null;
|
|
23
|
+
}
|
|
24
|
+
DeleteNamespaceResult.prototype.getItem = function () {
|
|
25
|
+
return this.item;
|
|
26
|
+
};
|
|
27
|
+
DeleteNamespaceResult.prototype.setItem = function (item) {
|
|
28
|
+
this.item = item;
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
DeleteNamespaceResult.prototype.withItem = function (item) {
|
|
32
|
+
this.item = item;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
DeleteNamespaceResult.fromDict = function (data) {
|
|
36
|
+
return new DeleteNamespaceResult()
|
|
37
|
+
.withItem(Gs2Guard.Namespace.fromDict(data["item"]));
|
|
38
|
+
};
|
|
39
|
+
DeleteNamespaceResult.prototype.toDict = function () {
|
|
40
|
+
var _a;
|
|
41
|
+
return {
|
|
42
|
+
"item": (_a = this.getItem()) === null || _a === void 0 ? void 0 : _a.toDict(),
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
return DeleteNamespaceResult;
|
|
46
|
+
}());
|
|
47
|
+
exports.default = DeleteNamespaceResult;
|
|
48
|
+
//# sourceMappingURL=DeleteNamespaceResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteNamespaceResult.js","sourceRoot":"","sources":["DeleteNamespaceResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,yDAAoC;AAEpC;IAAA;QACY,SAAI,GAA4B,IAAI,CAAC;IA0BjD,CAAC;IAxBU,uCAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,uCAAO,GAAd,UAAe,IAA6B;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,wCAAQ,GAAf,UAAgB,IAA6B;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,8BAAQ,GAAtB,UAAuB,IAA0B;QAC7C,OAAO,IAAI,qBAAqB,EAAE;aAC7B,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEM,sCAAM,GAAb;;QACI,OAAO;YACH,MAAM,EAAE,MAAA,IAAI,CAAC,OAAO,EAAE,0CAAE,MAAM,EAAE;SACnC,CAAC;IACN,CAAC;IACL,4BAAC;AAAD,CAAC,AA3BD,IA2BC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 IResult from '../../core/interface/IResult';
|
|
18
|
+
import * as Gs2Guard from '../model'
|
|
19
|
+
|
|
20
|
+
export default class DeleteNamespaceResult implements IResult {
|
|
21
|
+
private item: Gs2Guard.Namespace|null = null;
|
|
22
|
+
|
|
23
|
+
public getItem(): Gs2Guard.Namespace|null {
|
|
24
|
+
return this.item;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public setItem(item: Gs2Guard.Namespace|null) {
|
|
28
|
+
this.item = item;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public withItem(item: Gs2Guard.Namespace|null): this {
|
|
33
|
+
this.item = item;
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public static fromDict(data: {[key: string]: any}): DeleteNamespaceResult {
|
|
38
|
+
return new DeleteNamespaceResult()
|
|
39
|
+
.withItem(Gs2Guard.Namespace.fromDict(data["item"]));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public toDict(): {[key: string]: any} {
|
|
43
|
+
return {
|
|
44
|
+
"item": this.getItem()?.toDict(),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import IResult from '../../core/interface/IResult';
|
|
2
|
+
import * as Gs2Guard from '../model';
|
|
3
|
+
export default class DescribeNamespacesResult implements IResult {
|
|
4
|
+
private items;
|
|
5
|
+
private nextPageToken;
|
|
6
|
+
getItems(): Gs2Guard.Namespace[] | null;
|
|
7
|
+
setItems(items: Gs2Guard.Namespace[] | null): this;
|
|
8
|
+
withItems(items: Gs2Guard.Namespace[] | null): this;
|
|
9
|
+
getNextPageToken(): string | null;
|
|
10
|
+
setNextPageToken(nextPageToken: string | null): this;
|
|
11
|
+
withNextPageToken(nextPageToken: string | null): this;
|
|
12
|
+
static fromDict(data: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}): DescribeNamespacesResult;
|
|
15
|
+
toDict(): {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}
|