gs2-cdk 1.0.43 → 1.0.44
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/jobQueue/model/Namespace.d.ts +11 -6
- package/jobQueue/model/Namespace.js +47 -22
- package/jobQueue/model/Namespace.js.map +1 -1
- package/jobQueue/model/Namespace.ts +56 -26
- package/jobQueue/model/options/NamespaceOptions.d.ts +4 -4
- package/jobQueue/model/options/NamespaceOptions.ts +4 -4
- package/package.json +1 -1
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import { CdkResource, Stack } from "../../core/model";
|
|
2
|
+
import { GetAttr } from "../../core/func";
|
|
3
|
+
import NamespaceRef from "../ref/NamespaceRef";
|
|
1
4
|
import { NamespaceOptions } from "./options/NamespaceOptions";
|
|
2
|
-
export default class Namespace {
|
|
3
|
-
private readonly
|
|
5
|
+
export default class Namespace extends CdkResource {
|
|
6
|
+
private readonly stack;
|
|
4
7
|
private readonly name;
|
|
5
|
-
private readonly enableAutoRun;
|
|
6
8
|
private readonly description;
|
|
7
|
-
private readonly runNotification;
|
|
8
9
|
private readonly pushNotification;
|
|
10
|
+
private readonly runNotification;
|
|
9
11
|
private readonly logSetting;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
constructor(stack: Stack, name: string, options?: NamespaceOptions | null);
|
|
13
|
+
alternateKeys(): string;
|
|
14
|
+
resourceType(): string;
|
|
12
15
|
properties(): {
|
|
13
16
|
[name: string]: any;
|
|
14
17
|
};
|
|
18
|
+
ref(): NamespaceRef;
|
|
19
|
+
getAttrNamespaceId(): GetAttr;
|
|
15
20
|
}
|
|
@@ -1,48 +1,73 @@
|
|
|
1
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
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
18
|
+
const tslib_1 = require("tslib");
|
|
19
|
+
const model_1 = require("../../core/model");
|
|
20
|
+
const func_1 = require("../../core/func");
|
|
21
|
+
const NamespaceRef_1 = tslib_1.__importDefault(require("../ref/NamespaceRef"));
|
|
22
|
+
class Namespace extends model_1.CdkResource {
|
|
23
|
+
constructor(stack, name, options = null) {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
25
|
+
super("JobQueue_Namespace_" + name);
|
|
6
26
|
this.description = null;
|
|
7
|
-
this.runNotification = null;
|
|
8
27
|
this.pushNotification = null;
|
|
28
|
+
this.runNotification = null;
|
|
9
29
|
this.logSetting = null;
|
|
10
|
-
this.
|
|
11
|
-
this.ownerId = ownerId;
|
|
30
|
+
this.stack = stack;
|
|
12
31
|
this.name = name;
|
|
13
|
-
this.enableAutoRun = enableAutoRun;
|
|
14
32
|
this.description = (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : null;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
33
|
+
this.pushNotification = (_b = options === null || options === void 0 ? void 0 : options.pushNotification) !== null && _b !== void 0 ? _b : null;
|
|
34
|
+
this.runNotification = (_c = options === null || options === void 0 ? void 0 : options.runNotification) !== null && _c !== void 0 ? _c : null;
|
|
17
35
|
this.logSetting = (_d = options === null || options === void 0 ? void 0 : options.logSetting) !== null && _d !== void 0 ? _d : null;
|
|
18
|
-
|
|
36
|
+
stack.addResource(this);
|
|
37
|
+
}
|
|
38
|
+
alternateKeys() {
|
|
39
|
+
return "name";
|
|
40
|
+
}
|
|
41
|
+
resourceType() {
|
|
42
|
+
return "GS2::JobQueue::Namespace";
|
|
19
43
|
}
|
|
20
44
|
properties() {
|
|
21
45
|
var _a, _b, _c;
|
|
22
46
|
let properties = {};
|
|
23
|
-
if (this.ownerId != null) {
|
|
24
|
-
properties["ownerId"] = this.ownerId;
|
|
25
|
-
}
|
|
26
47
|
if (this.name != null) {
|
|
27
|
-
properties["
|
|
48
|
+
properties["Name"] = this.name;
|
|
28
49
|
}
|
|
29
50
|
if (this.description != null) {
|
|
30
|
-
properties["
|
|
51
|
+
properties["Description"] = this.description;
|
|
31
52
|
}
|
|
32
|
-
|
|
33
|
-
|
|
53
|
+
properties["EnableAutoRun"] = true;
|
|
54
|
+
if (this.pushNotification != null) {
|
|
55
|
+
properties["PushNotification"] = (_a = this.pushNotification) === null || _a === void 0 ? void 0 : _a.properties();
|
|
34
56
|
}
|
|
35
57
|
if (this.runNotification != null) {
|
|
36
|
-
properties["
|
|
37
|
-
}
|
|
38
|
-
if (this.pushNotification != null) {
|
|
39
|
-
properties["pushNotification"] = (_b = this.pushNotification) === null || _b === void 0 ? void 0 : _b.properties();
|
|
58
|
+
properties["RunNotification"] = (_b = this.runNotification) === null || _b === void 0 ? void 0 : _b.properties();
|
|
40
59
|
}
|
|
41
60
|
if (this.logSetting != null) {
|
|
42
|
-
properties["
|
|
61
|
+
properties["LogSetting"] = (_c = this.logSetting) === null || _c === void 0 ? void 0 : _c.properties();
|
|
43
62
|
}
|
|
44
63
|
return properties;
|
|
45
64
|
}
|
|
65
|
+
ref() {
|
|
66
|
+
return new NamespaceRef_1.default(this.name);
|
|
67
|
+
}
|
|
68
|
+
getAttrNamespaceId() {
|
|
69
|
+
return new func_1.GetAttr(this, "Item.NamespaceId", null);
|
|
70
|
+
}
|
|
46
71
|
}
|
|
47
72
|
exports.default = Namespace;
|
|
48
73
|
//# sourceMappingURL=Namespace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Namespace.js","sourceRoot":"","sources":["Namespace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Namespace.js","sourceRoot":"","sources":["Namespace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAoD;AACpD,0CAAwC;AAIxC,+EAA+C;AAI/C,MAAqB,SAAU,SAAQ,mBAAW;IAQ9C,YACI,KAAY,EACZ,IAAY,EACZ,UAAiC,IAAI;;QAErC,KAAK,CACD,qBAAqB,GAAG,IAAI,CAC/B,CAAC;QAZW,gBAAW,GAAgB,IAAI,CAAC;QAChC,qBAAgB,GAA6B,IAAI,CAAC;QAClD,oBAAe,GAA6B,IAAI,CAAC;QACjD,eAAU,GAAoB,IAAI,CAAC;QAWhD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,IAAI,CAAC;QAChD,IAAI,CAAC,gBAAgB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,IAAI,CAAC;QAC1D,IAAI,CAAC,eAAe,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,IAAI,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,IAAI,CAAC;QAC9C,KAAK,CAAC,WAAW,CACb,IAAI,CACP,CAAC;IACN,CAAC;IAGM,aAAa;QAEhB,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,YAAY;QAEf,OAAO,0BAA0B,CAAC;IACtC,CAAC;IAEM,UAAU;;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SAChD;QACD,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAA;QAClC,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,EAAE;YAC/B,UAAU,CAAC,kBAAkB,CAAC,GAAG,MAAA,IAAI,CAAC,gBAAgB,0CAAE,UAAU,EACjE,CAAC;SACL;QACD,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,iBAAiB,CAAC,GAAG,MAAA,IAAI,CAAC,eAAe,0CAAE,UAAU,EAC/D,CAAC;SACL;QACD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,YAAY,CAAC,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,UAAU,EACrD,CAAC;SACL;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAEM,GAAG;QAEN,OAAO,IAAI,sBAAY,CACnB,IAAI,CAAC,IAAK,CACb,CAAC;IACN,CAAC;IAEM,kBAAkB;QAErB,OAAO,IAAI,cAAO,CACd,IAAI,EACJ,kBAAkB,EAClB,IAAI,CACP,CAAC;IACN,CAAC;CACJ;AAjFD,4BAiFC"}
|
|
@@ -13,65 +13,95 @@
|
|
|
13
13
|
* express or implied. See the License for the specific language governing
|
|
14
14
|
* permissions and limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import {
|
|
16
|
+
|
|
17
|
+
import {CdkResource, Stack} from "../../core/model";
|
|
18
|
+
import {GetAttr} from "../../core/func";
|
|
19
|
+
import NotificationSetting from "../../core/model/NotificationSetting";
|
|
20
|
+
import LogSetting from "../../core/model/LogSetting";
|
|
21
|
+
|
|
22
|
+
import NamespaceRef from "../ref/NamespaceRef";
|
|
23
|
+
|
|
18
24
|
import { NamespaceOptions } from "./options/NamespaceOptions";
|
|
19
25
|
|
|
20
|
-
export default class Namespace {
|
|
21
|
-
private readonly
|
|
26
|
+
export default class Namespace extends CdkResource {
|
|
27
|
+
private readonly stack: Stack;
|
|
22
28
|
private readonly name: string;
|
|
23
|
-
private readonly enableAutoRun: boolean;
|
|
24
29
|
private readonly description: string|null = null;
|
|
25
|
-
private readonly runNotification: NotificationSetting|null = null;
|
|
26
30
|
private readonly pushNotification: NotificationSetting|null = null;
|
|
31
|
+
private readonly runNotification: NotificationSetting|null = null;
|
|
27
32
|
private readonly logSetting: LogSetting|null = null;
|
|
28
|
-
private readonly revision: number|null = null;
|
|
29
33
|
|
|
30
34
|
public constructor(
|
|
31
|
-
|
|
35
|
+
stack: Stack,
|
|
32
36
|
name: string,
|
|
33
|
-
enableAutoRun: boolean,
|
|
34
37
|
options: NamespaceOptions|null = null,
|
|
35
38
|
) {
|
|
36
|
-
|
|
39
|
+
super(
|
|
40
|
+
"JobQueue_Namespace_" + name
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
this.stack = stack;
|
|
37
44
|
this.name = name;
|
|
38
|
-
this.enableAutoRun = enableAutoRun;
|
|
39
45
|
this.description = options?.description ?? null;
|
|
40
|
-
this.runNotification = options?.runNotification ?? null;
|
|
41
46
|
this.pushNotification = options?.pushNotification ?? null;
|
|
47
|
+
this.runNotification = options?.runNotification ?? null;
|
|
42
48
|
this.logSetting = options?.logSetting ?? null;
|
|
43
|
-
|
|
49
|
+
stack.addResource(
|
|
50
|
+
this,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
public alternateKeys(
|
|
56
|
+
) {
|
|
57
|
+
return "name";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public resourceType(
|
|
61
|
+
): string {
|
|
62
|
+
return "GS2::JobQueue::Namespace";
|
|
44
63
|
}
|
|
45
64
|
|
|
46
65
|
public properties(
|
|
47
66
|
): {[name: string]: any} {
|
|
48
67
|
let properties: {[name: string]: any} = {};
|
|
49
68
|
|
|
50
|
-
if (this.ownerId != null) {
|
|
51
|
-
properties["ownerId"] = this.ownerId;
|
|
52
|
-
}
|
|
53
69
|
if (this.name != null) {
|
|
54
|
-
properties["
|
|
70
|
+
properties["Name"] = this.name;
|
|
55
71
|
}
|
|
56
72
|
if (this.description != null) {
|
|
57
|
-
properties["
|
|
73
|
+
properties["Description"] = this.description;
|
|
58
74
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (this.runNotification != null) {
|
|
63
|
-
properties["runNotification"] = this.runNotification?.properties(
|
|
75
|
+
properties["EnableAutoRun"] = true
|
|
76
|
+
if (this.pushNotification != null) {
|
|
77
|
+
properties["PushNotification"] = this.pushNotification?.properties(
|
|
64
78
|
);
|
|
65
79
|
}
|
|
66
|
-
if (this.
|
|
67
|
-
properties["
|
|
80
|
+
if (this.runNotification != null) {
|
|
81
|
+
properties["RunNotification"] = this.runNotification?.properties(
|
|
68
82
|
);
|
|
69
83
|
}
|
|
70
84
|
if (this.logSetting != null) {
|
|
71
|
-
properties["
|
|
85
|
+
properties["LogSetting"] = this.logSetting?.properties(
|
|
72
86
|
);
|
|
73
87
|
}
|
|
74
88
|
|
|
75
89
|
return properties;
|
|
76
90
|
}
|
|
91
|
+
|
|
92
|
+
public ref(
|
|
93
|
+
): NamespaceRef {
|
|
94
|
+
return new NamespaceRef(
|
|
95
|
+
this.name!,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public getAttrNamespaceId(
|
|
100
|
+
): GetAttr {
|
|
101
|
+
return new GetAttr(
|
|
102
|
+
this,
|
|
103
|
+
"Item.NamespaceId",
|
|
104
|
+
null,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
77
107
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import NotificationSetting from "../../../core/model/NotificationSetting";
|
|
2
|
+
import LogSetting from "../../../core/model/LogSetting";
|
|
3
3
|
export interface NamespaceOptions {
|
|
4
4
|
description?: string | null;
|
|
5
|
-
|
|
5
|
+
enableAutoRun?: boolean | null;
|
|
6
6
|
pushNotification?: NotificationSetting | null;
|
|
7
|
+
runNotification?: NotificationSetting | null;
|
|
7
8
|
logSetting?: LogSetting | null;
|
|
8
|
-
revision?: number | null;
|
|
9
9
|
}
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
* express or implied. See the License for the specific language governing
|
|
14
14
|
* permissions and limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import NotificationSetting from "../../../core/model/NotificationSetting";
|
|
17
|
+
import LogSetting from "../../../core/model/LogSetting";
|
|
18
18
|
|
|
19
19
|
export interface NamespaceOptions {
|
|
20
20
|
description?: string|null;
|
|
21
|
-
|
|
21
|
+
enableAutoRun?: boolean|null;
|
|
22
22
|
pushNotification?: NotificationSetting|null;
|
|
23
|
+
runNotification?: NotificationSetting|null;
|
|
23
24
|
logSetting?: LogSetting|null;
|
|
24
|
-
revision?: number|null;
|
|
25
25
|
}
|
|
26
26
|
|