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.
Files changed (129) hide show
  1. package/guard/index.d.ts +5 -0
  2. package/guard/index.js +28 -0
  3. package/guard/index.js.map +1 -0
  4. package/guard/index.ts +27 -0
  5. package/guard/model/BlockingPolicyModel.d.ts +65 -0
  6. package/guard/model/BlockingPolicyModel.js +248 -0
  7. package/guard/model/BlockingPolicyModel.js.map +1 -0
  8. package/guard/model/BlockingPolicyModel.ts +252 -0
  9. package/guard/model/Namespace.d.ts +43 -0
  10. package/guard/model/Namespace.js +184 -0
  11. package/guard/model/Namespace.js.map +1 -0
  12. package/guard/model/Namespace.ts +192 -0
  13. package/guard/model/index.d.ts +3 -0
  14. package/guard/model/index.js +24 -0
  15. package/guard/model/index.js.map +1 -0
  16. package/guard/model/index.ts +22 -0
  17. package/guard/request/CreateNamespaceRequest.d.ts +30 -0
  18. package/guard/request/CreateNamespaceRequest.js +100 -0
  19. package/guard/request/CreateNamespaceRequest.js.map +1 -0
  20. package/guard/request/CreateNamespaceRequest.ts +104 -0
  21. package/guard/request/DeleteNamespaceRequest.d.ts +21 -0
  22. package/guard/request/DeleteNamespaceRequest.js +69 -0
  23. package/guard/request/DeleteNamespaceRequest.js.map +1 -0
  24. package/guard/request/DeleteNamespaceRequest.ts +76 -0
  25. package/guard/request/DescribeNamespacesRequest.d.ts +25 -0
  26. package/guard/request/DescribeNamespacesRequest.js +83 -0
  27. package/guard/request/DescribeNamespacesRequest.js.map +1 -0
  28. package/guard/request/DescribeNamespacesRequest.ts +90 -0
  29. package/guard/request/GetNamespaceRequest.d.ts +21 -0
  30. package/guard/request/GetNamespaceRequest.js +69 -0
  31. package/guard/request/GetNamespaceRequest.js.map +1 -0
  32. package/guard/request/GetNamespaceRequest.ts +76 -0
  33. package/guard/request/GetNamespaceStatusRequest.d.ts +21 -0
  34. package/guard/request/GetNamespaceStatusRequest.js +69 -0
  35. package/guard/request/GetNamespaceStatusRequest.js.map +1 -0
  36. package/guard/request/GetNamespaceStatusRequest.ts +76 -0
  37. package/guard/request/UpdateNamespaceRequest.d.ts +30 -0
  38. package/guard/request/UpdateNamespaceRequest.js +100 -0
  39. package/guard/request/UpdateNamespaceRequest.js.map +1 -0
  40. package/guard/request/UpdateNamespaceRequest.ts +104 -0
  41. package/guard/request/index.d.ts +7 -0
  42. package/guard/request/index.js +32 -0
  43. package/guard/request/index.js.map +1 -0
  44. package/guard/request/index.ts +30 -0
  45. package/guard/rest.d.ts +13 -0
  46. package/guard/rest.js +176 -0
  47. package/guard/rest.js.map +1 -0
  48. package/guard/rest.ts +198 -0
  49. package/guard/result/CreateNamespaceResult.d.ts +14 -0
  50. package/guard/result/CreateNamespaceResult.js +48 -0
  51. package/guard/result/CreateNamespaceResult.js.map +1 -0
  52. package/guard/result/CreateNamespaceResult.ts +47 -0
  53. package/guard/result/DeleteNamespaceResult.d.ts +14 -0
  54. package/guard/result/DeleteNamespaceResult.js +48 -0
  55. package/guard/result/DeleteNamespaceResult.js.map +1 -0
  56. package/guard/result/DeleteNamespaceResult.ts +47 -0
  57. package/guard/result/DescribeNamespacesResult.d.ts +18 -0
  58. package/guard/result/DescribeNamespacesResult.js +67 -0
  59. package/guard/result/DescribeNamespacesResult.js.map +1 -0
  60. package/guard/result/DescribeNamespacesResult.ts +72 -0
  61. package/guard/result/GetNamespaceResult.d.ts +14 -0
  62. package/guard/result/GetNamespaceResult.js +48 -0
  63. package/guard/result/GetNamespaceResult.js.map +1 -0
  64. package/guard/result/GetNamespaceResult.ts +47 -0
  65. package/guard/result/GetNamespaceStatusResult.d.ts +13 -0
  66. package/guard/result/GetNamespaceStatusResult.js +45 -0
  67. package/guard/result/GetNamespaceStatusResult.js.map +1 -0
  68. package/guard/result/GetNamespaceStatusResult.ts +46 -0
  69. package/guard/result/UpdateNamespaceResult.d.ts +14 -0
  70. package/guard/result/UpdateNamespaceResult.js +48 -0
  71. package/guard/result/UpdateNamespaceResult.js.map +1 -0
  72. package/guard/result/UpdateNamespaceResult.ts +47 -0
  73. package/guard/result/index.d.ts +7 -0
  74. package/guard/result/index.js +32 -0
  75. package/guard/result/index.js.map +1 -0
  76. package/guard/result/index.ts +30 -0
  77. package/identifier/request/AttachGuardRequest.d.ts +29 -0
  78. package/identifier/request/AttachGuardRequest.js +97 -0
  79. package/identifier/request/AttachGuardRequest.js.map +1 -0
  80. package/identifier/request/AttachGuardRequest.ts +104 -0
  81. package/identifier/request/DescribeAttachedGuardsRequest.d.ts +25 -0
  82. package/identifier/request/DescribeAttachedGuardsRequest.js +83 -0
  83. package/identifier/request/DescribeAttachedGuardsRequest.js.map +1 -0
  84. package/identifier/request/DescribeAttachedGuardsRequest.ts +90 -0
  85. package/identifier/request/DetachGuardRequest.d.ts +29 -0
  86. package/identifier/request/DetachGuardRequest.js +97 -0
  87. package/identifier/request/DetachGuardRequest.js.map +1 -0
  88. package/identifier/request/DetachGuardRequest.ts +104 -0
  89. package/identifier/request/index.d.ts +4 -1
  90. package/identifier/request/index.js +7 -1
  91. package/identifier/request/index.js.map +1 -1
  92. package/identifier/request/index.ts +6 -0
  93. package/identifier/rest.d.ts +3 -0
  94. package/identifier/rest.js +75 -0
  95. package/identifier/rest.js.map +1 -1
  96. package/identifier/rest.ts +87 -0
  97. package/identifier/result/AttachGuardResult.d.ts +13 -0
  98. package/identifier/result/AttachGuardResult.js +51 -0
  99. package/identifier/result/AttachGuardResult.js.map +1 -0
  100. package/identifier/result/AttachGuardResult.ts +54 -0
  101. package/identifier/result/DescribeAttachedGuardsResult.d.ts +13 -0
  102. package/identifier/result/DescribeAttachedGuardsResult.js +51 -0
  103. package/identifier/result/DescribeAttachedGuardsResult.js.map +1 -0
  104. package/identifier/result/DescribeAttachedGuardsResult.ts +54 -0
  105. package/identifier/result/DetachGuardResult.d.ts +13 -0
  106. package/identifier/result/DetachGuardResult.js +51 -0
  107. package/identifier/result/DetachGuardResult.js.map +1 -0
  108. package/identifier/result/DetachGuardResult.ts +54 -0
  109. package/identifier/result/index.d.ts +4 -1
  110. package/identifier/result/index.js +7 -1
  111. package/identifier/result/index.js.map +1 -1
  112. package/identifier/result/index.ts +6 -0
  113. package/index.d.ts +2 -1
  114. package/index.js +4 -2
  115. package/index.js.map +1 -1
  116. package/index.ts +2 -0
  117. package/lock/request/index.d.ts +1 -3
  118. package/lock/request/index.js +1 -5
  119. package/lock/request/index.js.map +1 -1
  120. package/lock/request/index.ts +0 -4
  121. package/lock/rest.d.ts +0 -2
  122. package/lock/rest.js +0 -55
  123. package/lock/rest.js.map +1 -1
  124. package/lock/rest.ts +0 -63
  125. package/lock/result/index.d.ts +1 -3
  126. package/lock/result/index.js +1 -5
  127. package/lock/result/index.js.map +1 -1
  128. package/lock/result/index.ts +0 -4
  129. package/package.json +1 -1
@@ -0,0 +1,69 @@
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 GetNamespaceStatusRequest = /** @class */ (function () {
19
+ function GetNamespaceStatusRequest() {
20
+ this.requestId = null;
21
+ this.contextStack = null;
22
+ this.namespaceName = null;
23
+ }
24
+ GetNamespaceStatusRequest.prototype.getRequestId = function () {
25
+ return this.requestId;
26
+ };
27
+ GetNamespaceStatusRequest.prototype.setRequestId = function (requestId) {
28
+ this.requestId = requestId;
29
+ return this;
30
+ };
31
+ GetNamespaceStatusRequest.prototype.withRequestId = function (requestId) {
32
+ this.requestId = requestId;
33
+ return this;
34
+ };
35
+ GetNamespaceStatusRequest.prototype.getContextStack = function () {
36
+ return this.contextStack;
37
+ };
38
+ GetNamespaceStatusRequest.prototype.setContextStack = function (contextStack) {
39
+ this.contextStack = contextStack;
40
+ return this;
41
+ };
42
+ GetNamespaceStatusRequest.prototype.withContextStack = function (contextStack) {
43
+ this.contextStack = contextStack;
44
+ return this;
45
+ };
46
+ GetNamespaceStatusRequest.prototype.getNamespaceName = function () {
47
+ return this.namespaceName;
48
+ };
49
+ GetNamespaceStatusRequest.prototype.setNamespaceName = function (namespaceName) {
50
+ this.namespaceName = namespaceName;
51
+ return this;
52
+ };
53
+ GetNamespaceStatusRequest.prototype.withNamespaceName = function (namespaceName) {
54
+ this.namespaceName = namespaceName;
55
+ return this;
56
+ };
57
+ GetNamespaceStatusRequest.fromDict = function (data) {
58
+ return new GetNamespaceStatusRequest()
59
+ .withNamespaceName(data["namespaceName"]);
60
+ };
61
+ GetNamespaceStatusRequest.prototype.toDict = function () {
62
+ return {
63
+ "namespaceName": this.getNamespaceName(),
64
+ };
65
+ };
66
+ return GetNamespaceStatusRequest;
67
+ }());
68
+ exports.default = GetNamespaceStatusRequest;
69
+ //# sourceMappingURL=GetNamespaceStatusRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetNamespaceStatusRequest.js","sourceRoot":"","sources":["GetNamespaceStatusRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAMH;IAAA;QAEY,cAAS,GAAgB,IAAI,CAAC;QAC9B,iBAAY,GAAgB,IAAI,CAAC;QACjC,kBAAa,GAAgB,IAAI,CAAC;IAmD9C,CAAC;IAjDU,gDAAY,GAAnB;QACI,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAEM,gDAAY,GAAnB,UAAoB,SAAsB;QACtC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,iDAAa,GAApB,UAAqB,SAAsB;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,mDAAe,GAAtB;QACI,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAEM,mDAAe,GAAtB,UAAuB,YAAyB;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,oDAAgB,GAAvB,UAAwB,YAAyB;QAC7C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,oDAAgB,GAAvB;QACI,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IACM,oDAAgB,GAAvB,UAAwB,aAA0B;QAC9C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,qDAAiB,GAAxB,UAAyB,aAA0B;QAC/C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,kCAAQ,GAAtB,UAAuB,IAA0B;QAC7C,OAAO,IAAI,yBAAyB,EAAE;aACjC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAClD,CAAC;IAEM,0CAAM,GAAb;QACI,OAAO;YACH,eAAe,EAAE,IAAI,CAAC,gBAAgB,EAAE;SAC3C,CAAC;IACN,CAAC;IACL,gCAAC;AAAD,CAAC,AAvDD,IAuDC"}
@@ -0,0 +1,76 @@
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 IRequest from '../../core/interface/IRequest';
18
+
19
+ import * as Gs2Guard from '../model'
20
+
21
+ export default class GetNamespaceStatusRequest implements IRequest {
22
+
23
+ private requestId: string|null = null;
24
+ private contextStack: string|null = null;
25
+ private namespaceName: string|null = null;
26
+
27
+ public getRequestId(): string|null {
28
+ return this.requestId;
29
+ }
30
+
31
+ public setRequestId(requestId: string|null) {
32
+ this.requestId = requestId;
33
+ return this;
34
+ }
35
+
36
+ public withRequestId(requestId: string|null): this {
37
+ this.requestId = requestId;
38
+ return this;
39
+ }
40
+
41
+ public getContextStack(): string|null {
42
+ return this.contextStack;
43
+ }
44
+
45
+ public setContextStack(contextStack: string|null) {
46
+ this.contextStack = contextStack;
47
+ return this;
48
+ }
49
+
50
+ public withContextStack(contextStack: string|null): this {
51
+ this.contextStack = contextStack;
52
+ return this;
53
+ }
54
+ public getNamespaceName(): string|null {
55
+ return this.namespaceName;
56
+ }
57
+ public setNamespaceName(namespaceName: string|null) {
58
+ this.namespaceName = namespaceName;
59
+ return this;
60
+ }
61
+ public withNamespaceName(namespaceName: string|null): this {
62
+ this.namespaceName = namespaceName;
63
+ return this;
64
+ }
65
+
66
+ public static fromDict(data: {[key: string]: any}): GetNamespaceStatusRequest {
67
+ return new GetNamespaceStatusRequest()
68
+ .withNamespaceName(data["namespaceName"]);
69
+ }
70
+
71
+ public toDict(): {[key: string]: any} {
72
+ return {
73
+ "namespaceName": this.getNamespaceName(),
74
+ };
75
+ }
76
+ }
@@ -0,0 +1,30 @@
1
+ import IRequest from '../../core/interface/IRequest';
2
+ import * as Gs2Guard from '../model';
3
+ export default class UpdateNamespaceRequest implements IRequest {
4
+ private requestId;
5
+ private contextStack;
6
+ private namespaceName;
7
+ private description;
8
+ private blockingPolicy;
9
+ getRequestId(): string | null;
10
+ setRequestId(requestId: string | null): this;
11
+ withRequestId(requestId: string | null): this;
12
+ getContextStack(): string | null;
13
+ setContextStack(contextStack: string | null): this;
14
+ withContextStack(contextStack: string | null): this;
15
+ getNamespaceName(): string | null;
16
+ setNamespaceName(namespaceName: string | null): this;
17
+ withNamespaceName(namespaceName: string | null): this;
18
+ getDescription(): string | null;
19
+ setDescription(description: string | null): this;
20
+ withDescription(description: string | null): this;
21
+ getBlockingPolicy(): Gs2Guard.BlockingPolicyModel | null;
22
+ setBlockingPolicy(blockingPolicy: Gs2Guard.BlockingPolicyModel | null): this;
23
+ withBlockingPolicy(blockingPolicy: Gs2Guard.BlockingPolicyModel | null): this;
24
+ static fromDict(data: {
25
+ [key: string]: any;
26
+ }): UpdateNamespaceRequest;
27
+ toDict(): {
28
+ [key: string]: any;
29
+ };
30
+ }
@@ -0,0 +1,100 @@
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 UpdateNamespaceRequest = /** @class */ (function () {
21
+ function UpdateNamespaceRequest() {
22
+ this.requestId = null;
23
+ this.contextStack = null;
24
+ this.namespaceName = null;
25
+ this.description = null;
26
+ this.blockingPolicy = null;
27
+ }
28
+ UpdateNamespaceRequest.prototype.getRequestId = function () {
29
+ return this.requestId;
30
+ };
31
+ UpdateNamespaceRequest.prototype.setRequestId = function (requestId) {
32
+ this.requestId = requestId;
33
+ return this;
34
+ };
35
+ UpdateNamespaceRequest.prototype.withRequestId = function (requestId) {
36
+ this.requestId = requestId;
37
+ return this;
38
+ };
39
+ UpdateNamespaceRequest.prototype.getContextStack = function () {
40
+ return this.contextStack;
41
+ };
42
+ UpdateNamespaceRequest.prototype.setContextStack = function (contextStack) {
43
+ this.contextStack = contextStack;
44
+ return this;
45
+ };
46
+ UpdateNamespaceRequest.prototype.withContextStack = function (contextStack) {
47
+ this.contextStack = contextStack;
48
+ return this;
49
+ };
50
+ UpdateNamespaceRequest.prototype.getNamespaceName = function () {
51
+ return this.namespaceName;
52
+ };
53
+ UpdateNamespaceRequest.prototype.setNamespaceName = function (namespaceName) {
54
+ this.namespaceName = namespaceName;
55
+ return this;
56
+ };
57
+ UpdateNamespaceRequest.prototype.withNamespaceName = function (namespaceName) {
58
+ this.namespaceName = namespaceName;
59
+ return this;
60
+ };
61
+ UpdateNamespaceRequest.prototype.getDescription = function () {
62
+ return this.description;
63
+ };
64
+ UpdateNamespaceRequest.prototype.setDescription = function (description) {
65
+ this.description = description;
66
+ return this;
67
+ };
68
+ UpdateNamespaceRequest.prototype.withDescription = function (description) {
69
+ this.description = description;
70
+ return this;
71
+ };
72
+ UpdateNamespaceRequest.prototype.getBlockingPolicy = function () {
73
+ return this.blockingPolicy;
74
+ };
75
+ UpdateNamespaceRequest.prototype.setBlockingPolicy = function (blockingPolicy) {
76
+ this.blockingPolicy = blockingPolicy;
77
+ return this;
78
+ };
79
+ UpdateNamespaceRequest.prototype.withBlockingPolicy = function (blockingPolicy) {
80
+ this.blockingPolicy = blockingPolicy;
81
+ return this;
82
+ };
83
+ UpdateNamespaceRequest.fromDict = function (data) {
84
+ return new UpdateNamespaceRequest()
85
+ .withNamespaceName(data["namespaceName"])
86
+ .withDescription(data["description"])
87
+ .withBlockingPolicy(Gs2Guard.BlockingPolicyModel.fromDict(data["blockingPolicy"]));
88
+ };
89
+ UpdateNamespaceRequest.prototype.toDict = function () {
90
+ var _a;
91
+ return {
92
+ "namespaceName": this.getNamespaceName(),
93
+ "description": this.getDescription(),
94
+ "blockingPolicy": (_a = this.getBlockingPolicy()) === null || _a === void 0 ? void 0 : _a.toDict(),
95
+ };
96
+ };
97
+ return UpdateNamespaceRequest;
98
+ }());
99
+ exports.default = UpdateNamespaceRequest;
100
+ //# sourceMappingURL=UpdateNamespaceRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateNamespaceRequest.js","sourceRoot":"","sources":["UpdateNamespaceRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yDAAoC;AAEpC;IAAA;QAEY,cAAS,GAAgB,IAAI,CAAC;QAC9B,iBAAY,GAAgB,IAAI,CAAC;QACjC,kBAAa,GAAgB,IAAI,CAAC;QAClC,gBAAW,GAAgB,IAAI,CAAC;QAChC,mBAAc,GAAsC,IAAI,CAAC;IA6ErE,CAAC;IA3EU,6CAAY,GAAnB;QACI,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAEM,6CAAY,GAAnB,UAAoB,SAAsB;QACtC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,8CAAa,GAApB,UAAqB,SAAsB;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,gDAAe,GAAtB;QACI,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAEM,gDAAe,GAAtB,UAAuB,YAAyB;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,iDAAgB,GAAvB,UAAwB,YAAyB;QAC7C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,iDAAgB,GAAvB;QACI,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IACM,iDAAgB,GAAvB,UAAwB,aAA0B;QAC9C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,kDAAiB,GAAxB,UAAyB,aAA0B;QAC/C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,+CAAc,GAArB;QACI,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IACM,+CAAc,GAArB,UAAsB,WAAwB;QAC1C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,gDAAe,GAAtB,UAAuB,WAAwB;QAC3C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,kDAAiB,GAAxB;QACI,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IACM,kDAAiB,GAAxB,UAAyB,cAAiD;QACtE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,mDAAkB,GAAzB,UAA0B,cAAiD;QACvE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,+BAAQ,GAAtB,UAAuB,IAA0B;QAC7C,OAAO,IAAI,sBAAsB,EAAE;aAC9B,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aACxC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aACpC,kBAAkB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC3F,CAAC;IAEM,uCAAM,GAAb;;QACI,OAAO;YACH,eAAe,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACxC,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE;YACpC,gBAAgB,EAAE,MAAA,IAAI,CAAC,iBAAiB,EAAE,0CAAE,MAAM,EAAE;SACvD,CAAC;IACN,CAAC;IACL,6BAAC;AAAD,CAAC,AAnFD,IAmFC"}
@@ -0,0 +1,104 @@
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 IRequest from '../../core/interface/IRequest';
18
+
19
+ import * as Gs2Guard from '../model'
20
+
21
+ export default class UpdateNamespaceRequest implements IRequest {
22
+
23
+ private requestId: string|null = null;
24
+ private contextStack: string|null = null;
25
+ private namespaceName: string|null = null;
26
+ private description: string|null = null;
27
+ private blockingPolicy: Gs2Guard.BlockingPolicyModel|null = null;
28
+
29
+ public getRequestId(): string|null {
30
+ return this.requestId;
31
+ }
32
+
33
+ public setRequestId(requestId: string|null) {
34
+ this.requestId = requestId;
35
+ return this;
36
+ }
37
+
38
+ public withRequestId(requestId: string|null): this {
39
+ this.requestId = requestId;
40
+ return this;
41
+ }
42
+
43
+ public getContextStack(): string|null {
44
+ return this.contextStack;
45
+ }
46
+
47
+ public setContextStack(contextStack: string|null) {
48
+ this.contextStack = contextStack;
49
+ return this;
50
+ }
51
+
52
+ public withContextStack(contextStack: string|null): this {
53
+ this.contextStack = contextStack;
54
+ return this;
55
+ }
56
+ public getNamespaceName(): string|null {
57
+ return this.namespaceName;
58
+ }
59
+ public setNamespaceName(namespaceName: string|null) {
60
+ this.namespaceName = namespaceName;
61
+ return this;
62
+ }
63
+ public withNamespaceName(namespaceName: string|null): this {
64
+ this.namespaceName = namespaceName;
65
+ return this;
66
+ }
67
+ public getDescription(): string|null {
68
+ return this.description;
69
+ }
70
+ public setDescription(description: string|null) {
71
+ this.description = description;
72
+ return this;
73
+ }
74
+ public withDescription(description: string|null): this {
75
+ this.description = description;
76
+ return this;
77
+ }
78
+ public getBlockingPolicy(): Gs2Guard.BlockingPolicyModel|null {
79
+ return this.blockingPolicy;
80
+ }
81
+ public setBlockingPolicy(blockingPolicy: Gs2Guard.BlockingPolicyModel|null) {
82
+ this.blockingPolicy = blockingPolicy;
83
+ return this;
84
+ }
85
+ public withBlockingPolicy(blockingPolicy: Gs2Guard.BlockingPolicyModel|null): this {
86
+ this.blockingPolicy = blockingPolicy;
87
+ return this;
88
+ }
89
+
90
+ public static fromDict(data: {[key: string]: any}): UpdateNamespaceRequest {
91
+ return new UpdateNamespaceRequest()
92
+ .withNamespaceName(data["namespaceName"])
93
+ .withDescription(data["description"])
94
+ .withBlockingPolicy(Gs2Guard.BlockingPolicyModel.fromDict(data["blockingPolicy"]));
95
+ }
96
+
97
+ public toDict(): {[key: string]: any} {
98
+ return {
99
+ "namespaceName": this.getNamespaceName(),
100
+ "description": this.getDescription(),
101
+ "blockingPolicy": this.getBlockingPolicy()?.toDict(),
102
+ };
103
+ }
104
+ }
@@ -0,0 +1,7 @@
1
+ import DescribeNamespacesRequest from "./DescribeNamespacesRequest";
2
+ import CreateNamespaceRequest from "./CreateNamespaceRequest";
3
+ import GetNamespaceStatusRequest from "./GetNamespaceStatusRequest";
4
+ import GetNamespaceRequest from "./GetNamespaceRequest";
5
+ import UpdateNamespaceRequest from "./UpdateNamespaceRequest";
6
+ import DeleteNamespaceRequest from "./DeleteNamespaceRequest";
7
+ export { DescribeNamespacesRequest, CreateNamespaceRequest, GetNamespaceStatusRequest, GetNamespaceRequest, UpdateNamespaceRequest, DeleteNamespaceRequest, };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteNamespaceRequest = exports.UpdateNamespaceRequest = exports.GetNamespaceRequest = exports.GetNamespaceStatusRequest = exports.CreateNamespaceRequest = exports.DescribeNamespacesRequest = void 0;
4
+ var tslib_1 = require("tslib");
5
+ /*
6
+ Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
7
+ Reserved.
8
+
9
+ Licensed under the Apache License, Version 2.0 (the "License").
10
+ You may not use this file except in compliance with the License.
11
+ A copy of the License is located at
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+
15
+ or in the "license" file accompanying this file. This file is distributed
16
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
17
+ express or implied. See the License for the specific language governing
18
+ permissions and limitations under the License.
19
+ */
20
+ var DescribeNamespacesRequest_1 = tslib_1.__importDefault(require("./DescribeNamespacesRequest"));
21
+ exports.DescribeNamespacesRequest = DescribeNamespacesRequest_1.default;
22
+ var CreateNamespaceRequest_1 = tslib_1.__importDefault(require("./CreateNamespaceRequest"));
23
+ exports.CreateNamespaceRequest = CreateNamespaceRequest_1.default;
24
+ var GetNamespaceStatusRequest_1 = tslib_1.__importDefault(require("./GetNamespaceStatusRequest"));
25
+ exports.GetNamespaceStatusRequest = GetNamespaceStatusRequest_1.default;
26
+ var GetNamespaceRequest_1 = tslib_1.__importDefault(require("./GetNamespaceRequest"));
27
+ exports.GetNamespaceRequest = GetNamespaceRequest_1.default;
28
+ var UpdateNamespaceRequest_1 = tslib_1.__importDefault(require("./UpdateNamespaceRequest"));
29
+ exports.UpdateNamespaceRequest = UpdateNamespaceRequest_1.default;
30
+ var DeleteNamespaceRequest_1 = tslib_1.__importDefault(require("./DeleteNamespaceRequest"));
31
+ exports.DeleteNamespaceRequest = DeleteNamespaceRequest_1.default;
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,kGAAmE;AAQ/D,oCARG,mCAAyB,CAQH;AAP7B,4FAA6D;AAQzD,iCARG,gCAAsB,CAQH;AAP1B,kGAAmE;AAQ/D,oCARG,mCAAyB,CAQH;AAP7B,sFAAuD;AAQnD,8BARG,6BAAmB,CAQH;AAPvB,4FAA6D;AAQzD,iCARG,gCAAsB,CAQH;AAP1B,4FAA6D;AAQzD,iCARG,gCAAsB,CAQH"}
@@ -0,0 +1,30 @@
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
+ import DescribeNamespacesRequest from "./DescribeNamespacesRequest"
17
+ import CreateNamespaceRequest from "./CreateNamespaceRequest"
18
+ import GetNamespaceStatusRequest from "./GetNamespaceStatusRequest"
19
+ import GetNamespaceRequest from "./GetNamespaceRequest"
20
+ import UpdateNamespaceRequest from "./UpdateNamespaceRequest"
21
+ import DeleteNamespaceRequest from "./DeleteNamespaceRequest"
22
+
23
+ export {
24
+ DescribeNamespacesRequest,
25
+ CreateNamespaceRequest,
26
+ GetNamespaceStatusRequest,
27
+ GetNamespaceRequest,
28
+ UpdateNamespaceRequest,
29
+ DeleteNamespaceRequest,
30
+ };
@@ -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