gs2 1.4.10 → 1.4.11

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 (149) hide show
  1. package/account/model/CurrentModelMaster.d.ts +22 -0
  2. package/account/model/CurrentModelMaster.js +111 -0
  3. package/account/model/CurrentModelMaster.js.map +1 -0
  4. package/account/model/CurrentModelMaster.ts +121 -0
  5. package/account/model/GitHubCheckoutSetting.d.ts +37 -0
  6. package/account/model/GitHubCheckoutSetting.js +132 -0
  7. package/account/model/GitHubCheckoutSetting.js.map +1 -0
  8. package/account/model/GitHubCheckoutSetting.ts +130 -0
  9. package/account/model/OpenIdConnectSetting.d.ts +17 -0
  10. package/account/model/OpenIdConnectSetting.js +62 -0
  11. package/account/model/OpenIdConnectSetting.js.map +1 -0
  12. package/account/model/OpenIdConnectSetting.ts +60 -0
  13. package/account/model/TakeOverTypeModel.d.ts +32 -0
  14. package/account/model/TakeOverTypeModel.js +160 -0
  15. package/account/model/TakeOverTypeModel.js.map +1 -0
  16. package/account/model/TakeOverTypeModel.ts +171 -0
  17. package/account/model/TakeOverTypeModelMaster.d.ts +48 -0
  18. package/account/model/TakeOverTypeModelMaster.js +216 -0
  19. package/account/model/TakeOverTypeModelMaster.js.map +1 -0
  20. package/account/model/TakeOverTypeModelMaster.ts +227 -0
  21. package/account/model/index.d.ts +6 -1
  22. package/account/model/index.js +11 -1
  23. package/account/model/index.js.map +1 -1
  24. package/account/model/index.ts +10 -0
  25. package/account/request/CreateTakeOverOpenIdConnectAndByUserIdRequest.d.ts +41 -0
  26. package/account/request/CreateTakeOverOpenIdConnectAndByUserIdRequest.js +137 -0
  27. package/account/request/CreateTakeOverOpenIdConnectAndByUserIdRequest.js.map +1 -0
  28. package/account/request/CreateTakeOverOpenIdConnectAndByUserIdRequest.ts +147 -0
  29. package/account/request/CreateTakeOverOpenIdConnectRequest.d.ts +37 -0
  30. package/account/request/CreateTakeOverOpenIdConnectRequest.js +123 -0
  31. package/account/request/CreateTakeOverOpenIdConnectRequest.js.map +1 -0
  32. package/account/request/CreateTakeOverOpenIdConnectRequest.ts +133 -0
  33. package/account/request/CreateTakeOverTypeModelMasterRequest.d.ts +38 -0
  34. package/account/request/CreateTakeOverTypeModelMasterRequest.js +128 -0
  35. package/account/request/CreateTakeOverTypeModelMasterRequest.js.map +1 -0
  36. package/account/request/CreateTakeOverTypeModelMasterRequest.ts +132 -0
  37. package/account/request/DeleteTakeOverTypeModelMasterRequest.d.ts +25 -0
  38. package/account/request/DeleteTakeOverTypeModelMasterRequest.js +83 -0
  39. package/account/request/DeleteTakeOverTypeModelMasterRequest.js.map +1 -0
  40. package/account/request/DeleteTakeOverTypeModelMasterRequest.ts +90 -0
  41. package/account/request/DescribeTakeOverTypeModelMastersRequest.d.ts +29 -0
  42. package/account/request/DescribeTakeOverTypeModelMastersRequest.js +97 -0
  43. package/account/request/DescribeTakeOverTypeModelMastersRequest.js.map +1 -0
  44. package/account/request/DescribeTakeOverTypeModelMastersRequest.ts +104 -0
  45. package/account/request/DescribeTakeOverTypeModelsRequest.d.ts +21 -0
  46. package/account/request/DescribeTakeOverTypeModelsRequest.js +69 -0
  47. package/account/request/DescribeTakeOverTypeModelsRequest.js.map +1 -0
  48. package/account/request/DescribeTakeOverTypeModelsRequest.ts +76 -0
  49. package/account/request/DoTakeOverOpenIdConnectRequest.d.ts +29 -0
  50. package/account/request/DoTakeOverOpenIdConnectRequest.js +97 -0
  51. package/account/request/DoTakeOverOpenIdConnectRequest.js.map +1 -0
  52. package/account/request/DoTakeOverOpenIdConnectRequest.ts +104 -0
  53. package/account/request/ExportMasterRequest.d.ts +21 -0
  54. package/account/request/ExportMasterRequest.js +69 -0
  55. package/account/request/ExportMasterRequest.js.map +1 -0
  56. package/account/request/ExportMasterRequest.ts +76 -0
  57. package/account/request/GetCurrentModelMasterRequest.d.ts +21 -0
  58. package/account/request/GetCurrentModelMasterRequest.js +69 -0
  59. package/account/request/GetCurrentModelMasterRequest.js.map +1 -0
  60. package/account/request/GetCurrentModelMasterRequest.ts +76 -0
  61. package/account/request/GetTakeOverTypeModelMasterRequest.d.ts +25 -0
  62. package/account/request/GetTakeOverTypeModelMasterRequest.js +83 -0
  63. package/account/request/GetTakeOverTypeModelMasterRequest.js.map +1 -0
  64. package/account/request/GetTakeOverTypeModelMasterRequest.ts +90 -0
  65. package/account/request/GetTakeOverTypeModelRequest.d.ts +25 -0
  66. package/account/request/GetTakeOverTypeModelRequest.js +83 -0
  67. package/account/request/GetTakeOverTypeModelRequest.js.map +1 -0
  68. package/account/request/GetTakeOverTypeModelRequest.ts +90 -0
  69. package/account/request/UpdateCurrentModelMasterFromGitHubRequest.d.ts +26 -0
  70. package/account/request/UpdateCurrentModelMasterFromGitHubRequest.js +86 -0
  71. package/account/request/UpdateCurrentModelMasterFromGitHubRequest.js.map +1 -0
  72. package/account/request/UpdateCurrentModelMasterFromGitHubRequest.ts +90 -0
  73. package/account/request/UpdateCurrentModelMasterRequest.d.ts +25 -0
  74. package/account/request/UpdateCurrentModelMasterRequest.js +83 -0
  75. package/account/request/UpdateCurrentModelMasterRequest.js.map +1 -0
  76. package/account/request/UpdateCurrentModelMasterRequest.ts +90 -0
  77. package/account/request/UpdateTakeOverTypeModelMasterRequest.d.ts +38 -0
  78. package/account/request/UpdateTakeOverTypeModelMasterRequest.js +128 -0
  79. package/account/request/UpdateTakeOverTypeModelMasterRequest.js.map +1 -0
  80. package/account/request/UpdateTakeOverTypeModelMasterRequest.ts +132 -0
  81. package/account/request/index.d.ts +15 -1
  82. package/account/request/index.js +30 -1
  83. package/account/request/index.js.map +1 -1
  84. package/account/request/index.ts +28 -0
  85. package/account/rest.d.ts +14 -0
  86. package/account/rest.js +370 -0
  87. package/account/rest.js.map +1 -1
  88. package/account/rest.ts +426 -0
  89. package/account/result/CreateTakeOverOpenIdConnectAndByUserIdResult.d.ts +14 -0
  90. package/account/result/CreateTakeOverOpenIdConnectAndByUserIdResult.js +48 -0
  91. package/account/result/CreateTakeOverOpenIdConnectAndByUserIdResult.js.map +1 -0
  92. package/account/result/CreateTakeOverOpenIdConnectAndByUserIdResult.ts +47 -0
  93. package/account/result/CreateTakeOverOpenIdConnectResult.d.ts +14 -0
  94. package/account/result/CreateTakeOverOpenIdConnectResult.js +48 -0
  95. package/account/result/CreateTakeOverOpenIdConnectResult.js.map +1 -0
  96. package/account/result/CreateTakeOverOpenIdConnectResult.ts +47 -0
  97. package/account/result/CreateTakeOverTypeModelMasterResult.d.ts +14 -0
  98. package/account/result/CreateTakeOverTypeModelMasterResult.js +48 -0
  99. package/account/result/CreateTakeOverTypeModelMasterResult.js.map +1 -0
  100. package/account/result/CreateTakeOverTypeModelMasterResult.ts +47 -0
  101. package/account/result/DeleteTakeOverTypeModelMasterResult.d.ts +14 -0
  102. package/account/result/DeleteTakeOverTypeModelMasterResult.js +48 -0
  103. package/account/result/DeleteTakeOverTypeModelMasterResult.js.map +1 -0
  104. package/account/result/DeleteTakeOverTypeModelMasterResult.ts +47 -0
  105. package/account/result/DescribeTakeOverTypeModelMastersResult.d.ts +18 -0
  106. package/account/result/DescribeTakeOverTypeModelMastersResult.js +67 -0
  107. package/account/result/DescribeTakeOverTypeModelMastersResult.js.map +1 -0
  108. package/account/result/DescribeTakeOverTypeModelMastersResult.ts +72 -0
  109. package/account/result/DescribeTakeOverTypeModelsResult.d.ts +14 -0
  110. package/account/result/DescribeTakeOverTypeModelsResult.js +53 -0
  111. package/account/result/DescribeTakeOverTypeModelsResult.js.map +1 -0
  112. package/account/result/DescribeTakeOverTypeModelsResult.ts +55 -0
  113. package/account/result/DoTakeOverOpenIdConnectResult.d.ts +14 -0
  114. package/account/result/DoTakeOverOpenIdConnectResult.js +48 -0
  115. package/account/result/DoTakeOverOpenIdConnectResult.js.map +1 -0
  116. package/account/result/DoTakeOverOpenIdConnectResult.ts +47 -0
  117. package/account/result/ExportMasterResult.d.ts +14 -0
  118. package/account/result/ExportMasterResult.js +48 -0
  119. package/account/result/ExportMasterResult.js.map +1 -0
  120. package/account/result/ExportMasterResult.ts +47 -0
  121. package/account/result/GetCurrentModelMasterResult.d.ts +14 -0
  122. package/account/result/GetCurrentModelMasterResult.js +48 -0
  123. package/account/result/GetCurrentModelMasterResult.js.map +1 -0
  124. package/account/result/GetCurrentModelMasterResult.ts +47 -0
  125. package/account/result/GetTakeOverTypeModelMasterResult.d.ts +14 -0
  126. package/account/result/GetTakeOverTypeModelMasterResult.js +48 -0
  127. package/account/result/GetTakeOverTypeModelMasterResult.js.map +1 -0
  128. package/account/result/GetTakeOverTypeModelMasterResult.ts +47 -0
  129. package/account/result/GetTakeOverTypeModelResult.d.ts +14 -0
  130. package/account/result/GetTakeOverTypeModelResult.js +48 -0
  131. package/account/result/GetTakeOverTypeModelResult.js.map +1 -0
  132. package/account/result/GetTakeOverTypeModelResult.ts +47 -0
  133. package/account/result/UpdateCurrentModelMasterFromGitHubResult.d.ts +14 -0
  134. package/account/result/UpdateCurrentModelMasterFromGitHubResult.js +48 -0
  135. package/account/result/UpdateCurrentModelMasterFromGitHubResult.js.map +1 -0
  136. package/account/result/UpdateCurrentModelMasterFromGitHubResult.ts +47 -0
  137. package/account/result/UpdateCurrentModelMasterResult.d.ts +14 -0
  138. package/account/result/UpdateCurrentModelMasterResult.js +48 -0
  139. package/account/result/UpdateCurrentModelMasterResult.js.map +1 -0
  140. package/account/result/UpdateCurrentModelMasterResult.ts +47 -0
  141. package/account/result/UpdateTakeOverTypeModelMasterResult.d.ts +14 -0
  142. package/account/result/UpdateTakeOverTypeModelMasterResult.js +48 -0
  143. package/account/result/UpdateTakeOverTypeModelMasterResult.js.map +1 -0
  144. package/account/result/UpdateTakeOverTypeModelMasterResult.ts +47 -0
  145. package/account/result/index.d.ts +15 -1
  146. package/account/result/index.js +30 -1
  147. package/account/result/index.js.map +1 -1
  148. package/account/result/index.ts +28 -0
  149. package/package.json +1 -1
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
3
+ Reserved.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License").
6
+ You may not use this file except in compliance with the License.
7
+ A copy of the License is located at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ or in the "license" file accompanying this file. This file is distributed
12
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ express or implied. See the License for the specific language governing
14
+ permissions and limitations under the License.
15
+ */
16
+
17
+ import IModel from '../../core/interface/IModel';
18
+
19
+ export default class OpenIdConnectSetting implements IModel {
20
+ private configurationPath: string|null = null;
21
+ private clientId: string|null = null;
22
+ public getConfigurationPath(): string|null {
23
+ return this.configurationPath;
24
+ }
25
+ public setConfigurationPath(configurationPath: string|null) {
26
+ this.configurationPath = configurationPath;
27
+ return this;
28
+ }
29
+ public withConfigurationPath(configurationPath: string|null): this {
30
+ this.configurationPath = configurationPath;
31
+ return this;
32
+ }
33
+ public getClientId(): string|null {
34
+ return this.clientId;
35
+ }
36
+ public setClientId(clientId: string|null) {
37
+ this.clientId = clientId;
38
+ return this;
39
+ }
40
+ public withClientId(clientId: string|null): this {
41
+ this.clientId = clientId;
42
+ return this;
43
+ }
44
+
45
+ public static fromDict(data: {[key: string]: any}): OpenIdConnectSetting|null {
46
+ if (data == undefined || data == null) {
47
+ return null;
48
+ }
49
+ return new OpenIdConnectSetting()
50
+ .withConfigurationPath(data["configurationPath"])
51
+ .withClientId(data["clientId"]);
52
+ }
53
+
54
+ public toDict(): {[key: string]: any} {
55
+ return {
56
+ "configurationPath": this.getConfigurationPath(),
57
+ "clientId": this.getClientId(),
58
+ };
59
+ }
60
+ }
@@ -0,0 +1,32 @@
1
+ import IModel from '../../core/interface/IModel';
2
+ import OpenIdConnectSetting from './OpenIdConnectSetting';
3
+ export default class TakeOverTypeModel implements IModel {
4
+ private takeOverTypeModelId;
5
+ private type;
6
+ private metadata;
7
+ private openIdConnectSetting;
8
+ static getRegion(grn: string): string | null;
9
+ static getOwnerId(grn: string): string | null;
10
+ static getNamespaceName(grn: string): string | null;
11
+ static getType(grn: string): string | null;
12
+ static isValid(grn: string): boolean;
13
+ static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, type: string | null): string | null;
14
+ getTakeOverTypeModelId(): string | null;
15
+ setTakeOverTypeModelId(takeOverTypeModelId: string | null): this;
16
+ withTakeOverTypeModelId(takeOverTypeModelId: string | null): this;
17
+ getType(): number | null;
18
+ setType(type: number | null): this;
19
+ withType(type: number | null): this;
20
+ getMetadata(): string | null;
21
+ setMetadata(metadata: string | null): this;
22
+ withMetadata(metadata: string | null): this;
23
+ getOpenIdConnectSetting(): OpenIdConnectSetting | null;
24
+ setOpenIdConnectSetting(openIdConnectSetting: OpenIdConnectSetting | null): this;
25
+ withOpenIdConnectSetting(openIdConnectSetting: OpenIdConnectSetting | null): this;
26
+ static fromDict(data: {
27
+ [key: string]: any;
28
+ }): TakeOverTypeModel | null;
29
+ toDict(): {
30
+ [key: string]: any;
31
+ };
32
+ }
@@ -0,0 +1,160 @@
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 OpenIdConnectSetting_1 = tslib_1.__importDefault(require("./OpenIdConnectSetting"));
20
+ var grnFormat = "grn:gs2:{region}:{ownerId}:account:{namespaceName}:model:takeOver:{type}";
21
+ var TakeOverTypeModel = /** @class */ (function () {
22
+ function TakeOverTypeModel() {
23
+ this.takeOverTypeModelId = null;
24
+ this.type = null;
25
+ this.metadata = null;
26
+ this.openIdConnectSetting = null;
27
+ }
28
+ TakeOverTypeModel.getRegion = function (grn) {
29
+ var match = grn.match(grnFormat
30
+ .replace('{region}', '(.*)')
31
+ .replace('{ownerId}', '.*')
32
+ .replace('{namespaceName}', '.*')
33
+ .replace('{type}', '.*'));
34
+ if (match) {
35
+ return match[1];
36
+ }
37
+ return null;
38
+ };
39
+ TakeOverTypeModel.getOwnerId = function (grn) {
40
+ var match = grn.match(grnFormat
41
+ .replace('{region}', '.*')
42
+ .replace('{ownerId}', '(.*)')
43
+ .replace('{namespaceName}', '.*')
44
+ .replace('{type}', '.*'));
45
+ if (match) {
46
+ return match[1];
47
+ }
48
+ return null;
49
+ };
50
+ TakeOverTypeModel.getNamespaceName = function (grn) {
51
+ var match = grn.match(grnFormat
52
+ .replace('{region}', '.*')
53
+ .replace('{ownerId}', '.*')
54
+ .replace('{namespaceName}', '(.*)')
55
+ .replace('{type}', '.*'));
56
+ if (match) {
57
+ return match[1];
58
+ }
59
+ return null;
60
+ };
61
+ TakeOverTypeModel.getType = function (grn) {
62
+ var match = grn.match(grnFormat
63
+ .replace('{region}', '.*')
64
+ .replace('{ownerId}', '.*')
65
+ .replace('{namespaceName}', '.*')
66
+ .replace('{type}', '(.*)'));
67
+ if (match) {
68
+ return match[1];
69
+ }
70
+ return null;
71
+ };
72
+ TakeOverTypeModel.isValid = function (grn) {
73
+ if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
74
+ return false;
75
+ }
76
+ if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
77
+ return false;
78
+ }
79
+ if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
80
+ return false;
81
+ }
82
+ if (this.getType(grn) == null || this.getType(grn) === '') {
83
+ return false;
84
+ }
85
+ return true;
86
+ };
87
+ TakeOverTypeModel.createGrn = function (region, ownerId, namespaceName, type) {
88
+ return grnFormat
89
+ .replace('{region}', region !== null && region !== void 0 ? region : '')
90
+ .replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
91
+ .replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
92
+ .replace('{type}', type !== null && type !== void 0 ? type : '');
93
+ };
94
+ TakeOverTypeModel.prototype.getTakeOverTypeModelId = function () {
95
+ return this.takeOverTypeModelId;
96
+ };
97
+ TakeOverTypeModel.prototype.setTakeOverTypeModelId = function (takeOverTypeModelId) {
98
+ this.takeOverTypeModelId = takeOverTypeModelId;
99
+ return this;
100
+ };
101
+ TakeOverTypeModel.prototype.withTakeOverTypeModelId = function (takeOverTypeModelId) {
102
+ this.takeOverTypeModelId = takeOverTypeModelId;
103
+ return this;
104
+ };
105
+ TakeOverTypeModel.prototype.getType = function () {
106
+ return this.type;
107
+ };
108
+ TakeOverTypeModel.prototype.setType = function (type) {
109
+ this.type = type;
110
+ return this;
111
+ };
112
+ TakeOverTypeModel.prototype.withType = function (type) {
113
+ this.type = type;
114
+ return this;
115
+ };
116
+ TakeOverTypeModel.prototype.getMetadata = function () {
117
+ return this.metadata;
118
+ };
119
+ TakeOverTypeModel.prototype.setMetadata = function (metadata) {
120
+ this.metadata = metadata;
121
+ return this;
122
+ };
123
+ TakeOverTypeModel.prototype.withMetadata = function (metadata) {
124
+ this.metadata = metadata;
125
+ return this;
126
+ };
127
+ TakeOverTypeModel.prototype.getOpenIdConnectSetting = function () {
128
+ return this.openIdConnectSetting;
129
+ };
130
+ TakeOverTypeModel.prototype.setOpenIdConnectSetting = function (openIdConnectSetting) {
131
+ this.openIdConnectSetting = openIdConnectSetting;
132
+ return this;
133
+ };
134
+ TakeOverTypeModel.prototype.withOpenIdConnectSetting = function (openIdConnectSetting) {
135
+ this.openIdConnectSetting = openIdConnectSetting;
136
+ return this;
137
+ };
138
+ TakeOverTypeModel.fromDict = function (data) {
139
+ if (data == undefined || data == null) {
140
+ return null;
141
+ }
142
+ return new TakeOverTypeModel()
143
+ .withTakeOverTypeModelId(data["takeOverTypeModelId"])
144
+ .withType(data["type"])
145
+ .withMetadata(data["metadata"])
146
+ .withOpenIdConnectSetting(OpenIdConnectSetting_1.default.fromDict(data["openIdConnectSetting"]));
147
+ };
148
+ TakeOverTypeModel.prototype.toDict = function () {
149
+ var _a;
150
+ return {
151
+ "takeOverTypeModelId": this.getTakeOverTypeModelId(),
152
+ "type": this.getType(),
153
+ "metadata": this.getMetadata(),
154
+ "openIdConnectSetting": (_a = this.getOpenIdConnectSetting()) === null || _a === void 0 ? void 0 : _a.toDict(),
155
+ };
156
+ };
157
+ return TakeOverTypeModel;
158
+ }());
159
+ exports.default = TakeOverTypeModel;
160
+ //# sourceMappingURL=TakeOverTypeModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TakeOverTypeModel.js","sourceRoot":"","sources":["TakeOverTypeModel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,wFAA0D;AAC1D,IAAM,SAAS,GAAW,0EAA0E,CAAC;AAErG;IAAA;QACY,wBAAmB,GAAgB,IAAI,CAAC;QACxC,SAAI,GAAgB,IAAI,CAAC;QACzB,aAAQ,GAAgB,IAAI,CAAC;QAC7B,yBAAoB,GAA8B,IAAI,CAAC;IAkJnE,CAAC;IAhJiB,2BAAS,GAAvB,UAAwB,GAAW;QAC/B,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC;aAC3B,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC;aAC1B,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC;aAChC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAC3B,CAAC;QACF,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;SACnB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,4BAAU,GAAxB,UAAyB,GAAW;QAChC,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC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oB,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC;IAEM,kCAAM,GAAb;;QACI,OAAO;YACH,qBAAqB,EAAE,IAAI,CAAC,sBAAsB,EAAE;YACpD,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;YAC9B,sBAAsB,EAAE,MAAA,IAAI,CAAC,uBAAuB,EAAE,0CAAE,MAAM,EAAE;SACnE,CAAC;IACN,CAAC;IACL,wBAAC;AAAD,CAAC,AAtJD,IAsJC"}
@@ -0,0 +1,171 @@
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
+ import OpenIdConnectSetting from './OpenIdConnectSetting';
19
+ const grnFormat: string = "grn:gs2:{region}:{ownerId}:account:{namespaceName}:model:takeOver:{type}";
20
+
21
+ export default class TakeOverTypeModel implements IModel {
22
+ private takeOverTypeModelId: string|null = null;
23
+ private type: number|null = null;
24
+ private metadata: string|null = null;
25
+ private openIdConnectSetting: OpenIdConnectSetting|null = null;
26
+
27
+ public static getRegion(grn: string): string|null {
28
+ const match = grn.match(grnFormat
29
+ .replace('{region}', '(.*)')
30
+ .replace('{ownerId}', '.*')
31
+ .replace('{namespaceName}', '.*')
32
+ .replace('{type}', '.*')
33
+ );
34
+ if (match) {
35
+ return match[1];
36
+ }
37
+ return null;
38
+ }
39
+
40
+ public static getOwnerId(grn: string): string|null {
41
+ const match = grn.match(grnFormat
42
+ .replace('{region}', '.*')
43
+ .replace('{ownerId}', '(.*)')
44
+ .replace('{namespaceName}', '.*')
45
+ .replace('{type}', '.*')
46
+ );
47
+ if (match) {
48
+ return match[1];
49
+ }
50
+ return null;
51
+ }
52
+
53
+ public static getNamespaceName(grn: string): string|null {
54
+ const match = grn.match(grnFormat
55
+ .replace('{region}', '.*')
56
+ .replace('{ownerId}', '.*')
57
+ .replace('{namespaceName}', '(.*)')
58
+ .replace('{type}', '.*')
59
+ );
60
+ if (match) {
61
+ return match[1];
62
+ }
63
+ return null;
64
+ }
65
+
66
+ public static getType(grn: string): string|null {
67
+ const match = grn.match(grnFormat
68
+ .replace('{region}', '.*')
69
+ .replace('{ownerId}', '.*')
70
+ .replace('{namespaceName}', '.*')
71
+ .replace('{type}', '(.*)')
72
+ );
73
+ if (match) {
74
+ return match[1];
75
+ }
76
+ return null;
77
+ }
78
+
79
+ public static isValid(grn: string): boolean {
80
+ if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
81
+ return false;
82
+ }
83
+ if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
84
+ return false;
85
+ }
86
+ if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
87
+ return false;
88
+ }
89
+ if (this.getType(grn) == null || this.getType(grn) === '') {
90
+ return false;
91
+ }
92
+ return true;
93
+ }
94
+
95
+ public static createGrn(
96
+ region: string|null,
97
+ ownerId: string|null,
98
+ namespaceName: string|null,
99
+ type: string|null,
100
+ ): string|null {
101
+ return grnFormat
102
+ .replace('{region}', region ?? '')
103
+ .replace('{ownerId}', ownerId ?? '')
104
+ .replace('{namespaceName}', namespaceName ?? '')
105
+ .replace('{type}', type ?? '');
106
+ }
107
+ public getTakeOverTypeModelId(): string|null {
108
+ return this.takeOverTypeModelId;
109
+ }
110
+ public setTakeOverTypeModelId(takeOverTypeModelId: string|null) {
111
+ this.takeOverTypeModelId = takeOverTypeModelId;
112
+ return this;
113
+ }
114
+ public withTakeOverTypeModelId(takeOverTypeModelId: string|null): this {
115
+ this.takeOverTypeModelId = takeOverTypeModelId;
116
+ return this;
117
+ }
118
+ public getType(): number|null {
119
+ return this.type;
120
+ }
121
+ public setType(type: number|null) {
122
+ this.type = type;
123
+ return this;
124
+ }
125
+ public withType(type: number|null): this {
126
+ this.type = type;
127
+ return this;
128
+ }
129
+ public getMetadata(): string|null {
130
+ return this.metadata;
131
+ }
132
+ public setMetadata(metadata: string|null) {
133
+ this.metadata = metadata;
134
+ return this;
135
+ }
136
+ public withMetadata(metadata: string|null): this {
137
+ this.metadata = metadata;
138
+ return this;
139
+ }
140
+ public getOpenIdConnectSetting(): OpenIdConnectSetting|null {
141
+ return this.openIdConnectSetting;
142
+ }
143
+ public setOpenIdConnectSetting(openIdConnectSetting: OpenIdConnectSetting|null) {
144
+ this.openIdConnectSetting = openIdConnectSetting;
145
+ return this;
146
+ }
147
+ public withOpenIdConnectSetting(openIdConnectSetting: OpenIdConnectSetting|null): this {
148
+ this.openIdConnectSetting = openIdConnectSetting;
149
+ return this;
150
+ }
151
+
152
+ public static fromDict(data: {[key: string]: any}): TakeOverTypeModel|null {
153
+ if (data == undefined || data == null) {
154
+ return null;
155
+ }
156
+ return new TakeOverTypeModel()
157
+ .withTakeOverTypeModelId(data["takeOverTypeModelId"])
158
+ .withType(data["type"])
159
+ .withMetadata(data["metadata"])
160
+ .withOpenIdConnectSetting(OpenIdConnectSetting.fromDict(data["openIdConnectSetting"]));
161
+ }
162
+
163
+ public toDict(): {[key: string]: any} {
164
+ return {
165
+ "takeOverTypeModelId": this.getTakeOverTypeModelId(),
166
+ "type": this.getType(),
167
+ "metadata": this.getMetadata(),
168
+ "openIdConnectSetting": this.getOpenIdConnectSetting()?.toDict(),
169
+ };
170
+ }
171
+ }
@@ -0,0 +1,48 @@
1
+ import IModel from '../../core/interface/IModel';
2
+ import OpenIdConnectSetting from './OpenIdConnectSetting';
3
+ export default class TakeOverTypeModelMaster implements IModel {
4
+ private takeOverTypeModelId;
5
+ private type;
6
+ private description;
7
+ private metadata;
8
+ private openIdConnectSetting;
9
+ private createdAt;
10
+ private updatedAt;
11
+ private revision;
12
+ static getRegion(grn: string): string | null;
13
+ static getOwnerId(grn: string): string | null;
14
+ static getNamespaceName(grn: string): string | null;
15
+ static getType(grn: string): string | null;
16
+ static isValid(grn: string): boolean;
17
+ static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, type: string | null): string | null;
18
+ getTakeOverTypeModelId(): string | null;
19
+ setTakeOverTypeModelId(takeOverTypeModelId: string | null): this;
20
+ withTakeOverTypeModelId(takeOverTypeModelId: string | null): this;
21
+ getType(): number | null;
22
+ setType(type: number | null): this;
23
+ withType(type: number | null): this;
24
+ getDescription(): string | null;
25
+ setDescription(description: string | null): this;
26
+ withDescription(description: string | null): this;
27
+ getMetadata(): string | null;
28
+ setMetadata(metadata: string | null): this;
29
+ withMetadata(metadata: string | null): this;
30
+ getOpenIdConnectSetting(): OpenIdConnectSetting | null;
31
+ setOpenIdConnectSetting(openIdConnectSetting: OpenIdConnectSetting | null): this;
32
+ withOpenIdConnectSetting(openIdConnectSetting: OpenIdConnectSetting | null): this;
33
+ getCreatedAt(): number | null;
34
+ setCreatedAt(createdAt: number | null): this;
35
+ withCreatedAt(createdAt: number | null): this;
36
+ getUpdatedAt(): number | null;
37
+ setUpdatedAt(updatedAt: number | null): this;
38
+ withUpdatedAt(updatedAt: number | null): this;
39
+ getRevision(): number | null;
40
+ setRevision(revision: number | null): this;
41
+ withRevision(revision: number | null): this;
42
+ static fromDict(data: {
43
+ [key: string]: any;
44
+ }): TakeOverTypeModelMaster | null;
45
+ toDict(): {
46
+ [key: string]: any;
47
+ };
48
+ }