gs2-cdk 1.0.136 → 1.0.137
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/log/model/AggregationConfig.d.ts +9 -0
- package/log/model/AggregationConfig.js +23 -0
- package/log/model/AggregationConfig.js.map +1 -0
- package/log/model/AggregationConfig.ts +43 -0
- package/log/model/Dashboard.d.ts +18 -0
- package/log/model/Dashboard.js +62 -0
- package/log/model/Dashboard.js.map +1 -0
- package/log/model/Dashboard.ts +96 -0
- package/log/model/Facet.d.ts +11 -0
- package/log/model/Facet.js +33 -0
- package/log/model/Facet.js.map +1 -0
- package/log/model/Facet.ts +58 -0
- package/log/model/FacetModel.d.ts +21 -0
- package/log/model/FacetModel.js +68 -0
- package/log/model/FacetModel.js.map +1 -0
- package/log/model/FacetModel.ts +106 -0
- package/log/model/FacetValueCount.d.ts +9 -0
- package/log/model/FacetValueCount.js +20 -0
- package/log/model/FacetValueCount.js.map +1 -0
- package/log/model/FacetValueCount.ts +44 -0
- package/log/model/Label.d.ts +9 -0
- package/log/model/Label.js +20 -0
- package/log/model/Label.js.map +1 -0
- package/log/model/Label.ts +44 -0
- package/log/model/LogEntry.d.ts +13 -0
- package/log/model/LogEntry.js +34 -0
- package/log/model/LogEntry.js.map +1 -0
- package/log/model/LogEntry.ts +64 -0
- package/log/model/MetricModel.d.ts +11 -0
- package/log/model/MetricModel.js +26 -0
- package/log/model/MetricModel.js.map +1 -0
- package/log/model/MetricModel.ts +50 -0
- package/log/model/NumericRange.d.ts +9 -0
- package/log/model/NumericRange.js +20 -0
- package/log/model/NumericRange.js.map +1 -0
- package/log/model/NumericRange.ts +44 -0
- package/log/model/TimeseriesMetadata.d.ts +9 -0
- package/log/model/TimeseriesMetadata.js +23 -0
- package/log/model/TimeseriesMetadata.js.map +1 -0
- package/log/model/TimeseriesMetadata.ts +42 -0
- package/log/model/TimeseriesPoint.d.ts +9 -0
- package/log/model/TimeseriesPoint.js +22 -0
- package/log/model/TimeseriesPoint.js.map +1 -0
- package/log/model/TimeseriesPoint.ts +45 -0
- package/log/model/TimeseriesValue.d.ts +9 -0
- package/log/model/TimeseriesValue.js +20 -0
- package/log/model/TimeseriesValue.js.map +1 -0
- package/log/model/TimeseriesValue.ts +44 -0
- package/log/model/Trace.d.ts +9 -0
- package/log/model/Trace.js +22 -0
- package/log/model/Trace.js.map +1 -0
- package/log/model/Trace.ts +46 -0
- package/log/model/enums/AggregationConfigType.d.ts +12 -0
- package/log/model/enums/AggregationConfigType.js +30 -0
- package/log/model/enums/AggregationConfigType.js.map +1 -0
- package/log/model/enums/AggregationConfigType.ts +30 -0
- package/log/model/enums/FacetModelType.d.ts +6 -0
- package/log/model/enums/FacetModelType.js +24 -0
- package/log/model/enums/FacetModelType.js.map +1 -0
- package/log/model/enums/FacetModelType.ts +24 -0
- package/log/model/enums/LogEntryStatus.d.ts +9 -0
- package/log/model/enums/LogEntryStatus.js +27 -0
- package/log/model/enums/LogEntryStatus.js.map +1 -0
- package/log/model/enums/LogEntryStatus.ts +27 -0
- package/log/model/enums/MetricModelType.d.ts +6 -0
- package/log/model/enums/MetricModelType.js +24 -0
- package/log/model/enums/MetricModelType.js.map +1 -0
- package/log/model/enums/MetricModelType.ts +24 -0
- package/log/model/index.d.ts +31 -1
- package/log/model/index.js +35 -1
- package/log/model/index.js.map +1 -1
- package/log/model/index.ts +60 -0
- package/log/model/options/AggregationConfigOptions.d.ts +5 -0
- package/log/model/options/AggregationConfigOptions.js +3 -0
- package/log/model/options/AggregationConfigOptions.js.map +1 -0
- package/log/model/options/AggregationConfigOptions.ts +22 -0
- package/log/model/options/DashboardOptions.d.ts +3 -0
- package/log/model/options/DashboardOptions.js +18 -0
- package/log/model/options/DashboardOptions.js.map +1 -0
- package/log/model/options/DashboardOptions.ts +20 -0
- package/log/model/options/FacetModelOptions.d.ts +3 -0
- package/log/model/options/FacetModelOptions.js +3 -0
- package/log/model/options/FacetModelOptions.js.map +1 -0
- package/log/model/options/FacetModelOptions.ts +21 -0
- package/log/model/options/FacetOptions.d.ts +7 -0
- package/log/model/options/FacetOptions.js +3 -0
- package/log/model/options/FacetOptions.js.map +1 -0
- package/log/model/options/FacetOptions.ts +24 -0
- package/log/model/options/FacetValueCountOptions.d.ts +2 -0
- package/log/model/options/FacetValueCountOptions.js +18 -0
- package/log/model/options/FacetValueCountOptions.js.map +1 -0
- package/log/model/options/FacetValueCountOptions.ts +19 -0
- package/log/model/options/LabelOptions.d.ts +2 -0
- package/log/model/options/LabelOptions.js +18 -0
- package/log/model/options/LabelOptions.js.map +1 -0
- package/log/model/options/LabelOptions.ts +19 -0
- package/log/model/options/LogEntryOptions.d.ts +4 -0
- package/log/model/options/LogEntryOptions.js +3 -0
- package/log/model/options/LogEntryOptions.js.map +1 -0
- package/log/model/options/LogEntryOptions.ts +22 -0
- package/log/model/options/MetricModelOptions.d.ts +3 -0
- package/log/model/options/MetricModelOptions.js +3 -0
- package/log/model/options/MetricModelOptions.js.map +1 -0
- package/log/model/options/MetricModelOptions.ts +21 -0
- package/log/model/options/NumericRangeOptions.d.ts +2 -0
- package/log/model/options/NumericRangeOptions.js +18 -0
- package/log/model/options/NumericRangeOptions.js.map +1 -0
- package/log/model/options/NumericRangeOptions.ts +19 -0
- package/log/model/options/TimeseriesMetadataOptions.d.ts +4 -0
- package/log/model/options/TimeseriesMetadataOptions.js +18 -0
- package/log/model/options/TimeseriesMetadataOptions.js.map +1 -0
- package/log/model/options/TimeseriesMetadataOptions.ts +21 -0
- package/log/model/options/TimeseriesPointOptions.d.ts +4 -0
- package/log/model/options/TimeseriesPointOptions.js +3 -0
- package/log/model/options/TimeseriesPointOptions.js.map +1 -0
- package/log/model/options/TimeseriesPointOptions.ts +21 -0
- package/log/model/options/TimeseriesValueOptions.d.ts +2 -0
- package/log/model/options/TimeseriesValueOptions.js +18 -0
- package/log/model/options/TimeseriesValueOptions.js.map +1 -0
- package/log/model/options/TimeseriesValueOptions.ts +19 -0
- package/log/model/options/TraceOptions.d.ts +4 -0
- package/log/model/options/TraceOptions.js +3 -0
- package/log/model/options/TraceOptions.js.map +1 -0
- package/log/model/options/TraceOptions.ts +22 -0
- package/log/ref/DashboardRef.d.ts +6 -0
- package/log/ref/DashboardRef.js +38 -0
- package/log/ref/DashboardRef.js.map +1 -0
- package/log/ref/DashboardRef.ts +52 -0
- package/log/ref/FacetModelRef.d.ts +6 -0
- package/log/ref/FacetModelRef.js +39 -0
- package/log/ref/FacetModelRef.js.map +1 -0
- package/log/ref/FacetModelRef.ts +53 -0
- package/log/ref/MetricModelRef.d.ts +5 -0
- package/log/ref/MetricModelRef.js +25 -0
- package/log/ref/MetricModelRef.js.map +1 -0
- package/log/ref/MetricModelRef.ts +30 -0
- package/log/ref/NamespaceRef.js.map +1 -1
- package/log/ref/NamespaceRef.ts +3 -0
- package/log/ref/index.d.ts +4 -1
- package/log/ref/index.js +7 -1
- package/log/ref/index.js.map +1 -1
- package/log/ref/index.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AggregationConfigOptions } from "./options/AggregationConfigOptions";
|
|
2
|
+
export default class AggregationConfig {
|
|
3
|
+
private readonly type;
|
|
4
|
+
private readonly field;
|
|
5
|
+
constructor(options?: AggregationConfigOptions | null);
|
|
6
|
+
properties(): {
|
|
7
|
+
[name: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class AggregationConfig {
|
|
4
|
+
constructor(options = null) {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
this.type = null;
|
|
7
|
+
this.field = null;
|
|
8
|
+
this.type = (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : null;
|
|
9
|
+
this.field = (_b = options === null || options === void 0 ? void 0 : options.field) !== null && _b !== void 0 ? _b : null;
|
|
10
|
+
}
|
|
11
|
+
properties() {
|
|
12
|
+
let properties = {};
|
|
13
|
+
if (this.type != null) {
|
|
14
|
+
properties["type"] = this.type;
|
|
15
|
+
}
|
|
16
|
+
if (this.field != null) {
|
|
17
|
+
properties["field"] = this.field;
|
|
18
|
+
}
|
|
19
|
+
return properties;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = AggregationConfig;
|
|
23
|
+
//# sourceMappingURL=AggregationConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AggregationConfig.js","sourceRoot":"","sources":["AggregationConfig.ts"],"names":[],"mappings":";;AAkBA,MAAqB,iBAAiB;IAIlC,YACI,UAAyC,IAAI;;QAJhC,SAAI,GAA+B,IAAI,CAAC;QACxC,UAAK,GAAgB,IAAI,CAAC;QAKvC,IAAI,CAAC,IAAI,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,IAAI,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,IAAI,CAAC;IACxC,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,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAxBD,oCAwBC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { AggregationConfigOptions } from "./options/AggregationConfigOptions";
|
|
17
|
+
import { AggregationConfigType } from "./enums/AggregationConfigType";
|
|
18
|
+
|
|
19
|
+
export default class AggregationConfig {
|
|
20
|
+
private readonly type: AggregationConfigType|null = null;
|
|
21
|
+
private readonly field: string|null = null;
|
|
22
|
+
|
|
23
|
+
public constructor(
|
|
24
|
+
options: AggregationConfigOptions|null = null,
|
|
25
|
+
) {
|
|
26
|
+
this.type = options?.type ?? null;
|
|
27
|
+
this.field = options?.field ?? null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public properties(
|
|
31
|
+
): {[name: string]: any} {
|
|
32
|
+
let properties: {[name: string]: any} = {};
|
|
33
|
+
|
|
34
|
+
if (this.type != null) {
|
|
35
|
+
properties["type"] = this.type;
|
|
36
|
+
}
|
|
37
|
+
if (this.field != null) {
|
|
38
|
+
properties["field"] = this.field;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return properties;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CdkResource, Stack } from "../../core/model";
|
|
2
|
+
import { GetAttr } from "../../core/func";
|
|
3
|
+
import DashboardRef from "../ref/DashboardRef";
|
|
4
|
+
import { DashboardOptions } from "./options/DashboardOptions";
|
|
5
|
+
export default class Dashboard extends CdkResource {
|
|
6
|
+
private readonly stack;
|
|
7
|
+
private readonly namespaceName;
|
|
8
|
+
private readonly displayName;
|
|
9
|
+
private readonly description;
|
|
10
|
+
constructor(stack: Stack, namespaceName: string, displayName: string, options?: DashboardOptions | null);
|
|
11
|
+
alternateKeys(): string;
|
|
12
|
+
resourceType(): string;
|
|
13
|
+
properties(): {
|
|
14
|
+
[name: string]: any;
|
|
15
|
+
};
|
|
16
|
+
ref(name: string): DashboardRef;
|
|
17
|
+
getAttrDashboardId(): GetAttr;
|
|
18
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
* deny overwrite
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
const tslib_1 = require("tslib");
|
|
21
|
+
const model_1 = require("../../core/model");
|
|
22
|
+
const func_1 = require("../../core/func");
|
|
23
|
+
const DashboardRef_1 = tslib_1.__importDefault(require("../ref/DashboardRef"));
|
|
24
|
+
class Dashboard extends model_1.CdkResource {
|
|
25
|
+
constructor(stack, namespaceName, displayName, options = null) {
|
|
26
|
+
var _a;
|
|
27
|
+
super("Log_Dashboard_" + displayName);
|
|
28
|
+
this.description = null;
|
|
29
|
+
this.stack = stack;
|
|
30
|
+
this.namespaceName = namespaceName;
|
|
31
|
+
this.displayName = displayName;
|
|
32
|
+
this.description = (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : null;
|
|
33
|
+
stack.addResource(this);
|
|
34
|
+
}
|
|
35
|
+
alternateKeys() {
|
|
36
|
+
return "name";
|
|
37
|
+
}
|
|
38
|
+
resourceType() {
|
|
39
|
+
return "GS2::Log::Dashboard";
|
|
40
|
+
}
|
|
41
|
+
properties() {
|
|
42
|
+
let properties = {};
|
|
43
|
+
if (this.namespaceName != null) {
|
|
44
|
+
properties["NamespaceName"] = this.namespaceName;
|
|
45
|
+
}
|
|
46
|
+
if (this.displayName != null) {
|
|
47
|
+
properties["DisplayName"] = this.displayName;
|
|
48
|
+
}
|
|
49
|
+
if (this.description != null) {
|
|
50
|
+
properties["Description"] = this.description;
|
|
51
|
+
}
|
|
52
|
+
return properties;
|
|
53
|
+
}
|
|
54
|
+
ref(name) {
|
|
55
|
+
return new DashboardRef_1.default(this.namespaceName, name);
|
|
56
|
+
}
|
|
57
|
+
getAttrDashboardId() {
|
|
58
|
+
return new func_1.GetAttr(this, "Item.DashboardId", null);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.default = Dashboard;
|
|
62
|
+
//# sourceMappingURL=Dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["Dashboard.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,4CAAoD;AACpD,0CAAwC;AAExC,+EAA+C;AAI/C,MAAqB,SAAU,SAAQ,mBAAW;IAM9C,YACI,KAAY,EACZ,aAAqB,EACrB,WAAmB,EACnB,UAAiC,IAAI;;QAErC,KAAK,CACD,gBAAgB,GAAG,WAAW,CACjC,CAAC;QAVW,gBAAW,GAAgB,IAAI,CAAC;QAY7C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,IAAI,CAAC;QAChD,KAAK,CAAC,WAAW,CACb,IAAI,CACP,CAAC;IACN,CAAC;IAGM,aAAa;QAEhB,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,YAAY;QAEf,OAAO,qBAAqB,CAAC;IACjC,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;SACpD;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SAChD;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAEM,GAAG,CACN,IAAY;QAEZ,OAAO,IAAI,sBAAY,CACnB,IAAI,CAAC,aAAa,EAClB,IAAK,CACR,CAAC;IACN,CAAC;IAEM,kBAAkB;QAErB,OAAO,IAAI,cAAO,CACd,IAAI,EACJ,kBAAkB,EAClB,IAAI,CACP,CAAC;IACN,CAAC;CACJ;AAtED,4BAsEC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
* deny overwrite
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import {CdkResource, Stack} from "../../core/model";
|
|
20
|
+
import {GetAttr} from "../../core/func";
|
|
21
|
+
|
|
22
|
+
import DashboardRef from "../ref/DashboardRef";
|
|
23
|
+
|
|
24
|
+
import { DashboardOptions } from "./options/DashboardOptions";
|
|
25
|
+
|
|
26
|
+
export default class Dashboard extends CdkResource {
|
|
27
|
+
private readonly stack: Stack;
|
|
28
|
+
private readonly namespaceName: string;
|
|
29
|
+
private readonly displayName: string;
|
|
30
|
+
private readonly description: string|null = null;
|
|
31
|
+
|
|
32
|
+
public constructor(
|
|
33
|
+
stack: Stack,
|
|
34
|
+
namespaceName: string,
|
|
35
|
+
displayName: string,
|
|
36
|
+
options: DashboardOptions|null = null,
|
|
37
|
+
) {
|
|
38
|
+
super(
|
|
39
|
+
"Log_Dashboard_" + displayName
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
this.stack = stack;
|
|
43
|
+
this.namespaceName = namespaceName;
|
|
44
|
+
this.displayName = displayName;
|
|
45
|
+
this.description = options?.description ?? null;
|
|
46
|
+
stack.addResource(
|
|
47
|
+
this,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
public alternateKeys(
|
|
53
|
+
) {
|
|
54
|
+
return "name";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public resourceType(
|
|
58
|
+
): string {
|
|
59
|
+
return "GS2::Log::Dashboard";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public properties(
|
|
63
|
+
): {[name: string]: any} {
|
|
64
|
+
let properties: {[name: string]: any} = {};
|
|
65
|
+
|
|
66
|
+
if (this.namespaceName != null) {
|
|
67
|
+
properties["NamespaceName"] = this.namespaceName;
|
|
68
|
+
}
|
|
69
|
+
if (this.displayName != null) {
|
|
70
|
+
properties["DisplayName"] = this.displayName;
|
|
71
|
+
}
|
|
72
|
+
if (this.description != null) {
|
|
73
|
+
properties["Description"] = this.description;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return properties;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public ref(
|
|
80
|
+
name: string,
|
|
81
|
+
): DashboardRef {
|
|
82
|
+
return new DashboardRef(
|
|
83
|
+
this.namespaceName,
|
|
84
|
+
name!,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public getAttrDashboardId(
|
|
89
|
+
): GetAttr {
|
|
90
|
+
return new GetAttr(
|
|
91
|
+
this,
|
|
92
|
+
"Item.DashboardId",
|
|
93
|
+
null,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FacetOptions } from "./options/FacetOptions";
|
|
2
|
+
export default class Facet {
|
|
3
|
+
private readonly field;
|
|
4
|
+
private readonly values;
|
|
5
|
+
private readonly range;
|
|
6
|
+
private readonly globalRange;
|
|
7
|
+
constructor(field: string, options?: FacetOptions | null);
|
|
8
|
+
properties(): {
|
|
9
|
+
[name: string]: any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Facet {
|
|
4
|
+
constructor(field, options = null) {
|
|
5
|
+
var _a, _b, _c;
|
|
6
|
+
this.values = null;
|
|
7
|
+
this.range = null;
|
|
8
|
+
this.globalRange = null;
|
|
9
|
+
this.field = field;
|
|
10
|
+
this.values = (_a = options === null || options === void 0 ? void 0 : options.values) !== null && _a !== void 0 ? _a : null;
|
|
11
|
+
this.range = (_b = options === null || options === void 0 ? void 0 : options.range) !== null && _b !== void 0 ? _b : null;
|
|
12
|
+
this.globalRange = (_c = options === null || options === void 0 ? void 0 : options.globalRange) !== null && _c !== void 0 ? _c : null;
|
|
13
|
+
}
|
|
14
|
+
properties() {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
let properties = {};
|
|
17
|
+
if (this.field != null) {
|
|
18
|
+
properties["field"] = this.field;
|
|
19
|
+
}
|
|
20
|
+
if (this.values != null) {
|
|
21
|
+
properties["values"] = this.values.map(v => v.properties());
|
|
22
|
+
}
|
|
23
|
+
if (this.range != null) {
|
|
24
|
+
properties["range"] = (_a = this.range) === null || _a === void 0 ? void 0 : _a.properties();
|
|
25
|
+
}
|
|
26
|
+
if (this.globalRange != null) {
|
|
27
|
+
properties["globalRange"] = (_b = this.globalRange) === null || _b === void 0 ? void 0 : _b.properties();
|
|
28
|
+
}
|
|
29
|
+
return properties;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = Facet;
|
|
33
|
+
//# sourceMappingURL=Facet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Facet.js","sourceRoot":"","sources":["Facet.ts"],"names":[],"mappings":";;AAmBA,MAAqB,KAAK;IAMtB,YACI,KAAa,EACb,UAA6B,IAAI;;QANpB,WAAM,GAA2B,IAAI,CAAC;QACtC,UAAK,GAAsB,IAAI,CAAC;QAChC,gBAAW,GAAsB,IAAI,CAAC;QAMnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,IAAI,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,IAAI,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,IAAI,CAAC;IACpD,CAAC;IAEM,UAAU;;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QACD,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE;YACrB,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EACnD,CAAC,CAAC;SACV;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,MAAA,IAAI,CAAC,KAAK,0CAAE,UAAU,EAC3C,CAAC;SACL;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,MAAA,IAAI,CAAC,WAAW,0CAAE,UAAU,EACvD,CAAC;SACL;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAtCD,wBAsCC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 FacetValueCount from "./FacetValueCount";
|
|
17
|
+
import NumericRange from "./NumericRange";
|
|
18
|
+
import { FacetOptions } from "./options/FacetOptions";
|
|
19
|
+
|
|
20
|
+
export default class Facet {
|
|
21
|
+
private readonly field: string;
|
|
22
|
+
private readonly values: FacetValueCount[]|null = null;
|
|
23
|
+
private readonly range: NumericRange|null = null;
|
|
24
|
+
private readonly globalRange: NumericRange|null = null;
|
|
25
|
+
|
|
26
|
+
public constructor(
|
|
27
|
+
field: string,
|
|
28
|
+
options: FacetOptions|null = null,
|
|
29
|
+
) {
|
|
30
|
+
this.field = field;
|
|
31
|
+
this.values = options?.values ?? null;
|
|
32
|
+
this.range = options?.range ?? null;
|
|
33
|
+
this.globalRange = options?.globalRange ?? null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public properties(
|
|
37
|
+
): {[name: string]: any} {
|
|
38
|
+
let properties: {[name: string]: any} = {};
|
|
39
|
+
|
|
40
|
+
if (this.field != null) {
|
|
41
|
+
properties["field"] = this.field;
|
|
42
|
+
}
|
|
43
|
+
if (this.values != null) {
|
|
44
|
+
properties["values"] = this.values.map(v => v.properties(
|
|
45
|
+
));
|
|
46
|
+
}
|
|
47
|
+
if (this.range != null) {
|
|
48
|
+
properties["range"] = this.range?.properties(
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (this.globalRange != null) {
|
|
52
|
+
properties["globalRange"] = this.globalRange?.properties(
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return properties;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CdkResource, Stack } from "../../core/model";
|
|
2
|
+
import { GetAttr } from "../../core/func";
|
|
3
|
+
import FacetModelRef from "../ref/FacetModelRef";
|
|
4
|
+
import { FacetModelType } from "./enums/FacetModelType";
|
|
5
|
+
import { FacetModelOptions } from "./options/FacetModelOptions";
|
|
6
|
+
export default class FacetModel extends CdkResource {
|
|
7
|
+
private readonly stack;
|
|
8
|
+
private readonly namespaceName;
|
|
9
|
+
private readonly field;
|
|
10
|
+
private readonly type;
|
|
11
|
+
private readonly displayName;
|
|
12
|
+
private readonly order;
|
|
13
|
+
constructor(stack: Stack, namespaceName: string, field: string, type: FacetModelType, displayName: string, options?: FacetModelOptions | null);
|
|
14
|
+
alternateKeys(): string;
|
|
15
|
+
resourceType(): string;
|
|
16
|
+
properties(): {
|
|
17
|
+
[name: string]: any;
|
|
18
|
+
};
|
|
19
|
+
ref(): FacetModelRef;
|
|
20
|
+
getAttrFacetModelId(): GetAttr;
|
|
21
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
const tslib_1 = require("tslib");
|
|
19
|
+
const model_1 = require("../../core/model");
|
|
20
|
+
const func_1 = require("../../core/func");
|
|
21
|
+
const FacetModelRef_1 = tslib_1.__importDefault(require("../ref/FacetModelRef"));
|
|
22
|
+
class FacetModel extends model_1.CdkResource {
|
|
23
|
+
constructor(stack, namespaceName, field, type, displayName, options = null) {
|
|
24
|
+
var _a;
|
|
25
|
+
super("Log_FacetModel_" + field);
|
|
26
|
+
this.order = null;
|
|
27
|
+
this.stack = stack;
|
|
28
|
+
this.namespaceName = namespaceName;
|
|
29
|
+
this.field = field;
|
|
30
|
+
this.type = type;
|
|
31
|
+
this.displayName = displayName;
|
|
32
|
+
this.order = (_a = options === null || options === void 0 ? void 0 : options.order) !== null && _a !== void 0 ? _a : null;
|
|
33
|
+
stack.addResource(this);
|
|
34
|
+
}
|
|
35
|
+
alternateKeys() {
|
|
36
|
+
return "field";
|
|
37
|
+
}
|
|
38
|
+
resourceType() {
|
|
39
|
+
return "GS2::Log::FacetModel";
|
|
40
|
+
}
|
|
41
|
+
properties() {
|
|
42
|
+
let properties = {};
|
|
43
|
+
if (this.namespaceName != null) {
|
|
44
|
+
properties["NamespaceName"] = this.namespaceName;
|
|
45
|
+
}
|
|
46
|
+
if (this.field != null) {
|
|
47
|
+
properties["Field"] = this.field;
|
|
48
|
+
}
|
|
49
|
+
if (this.type != null) {
|
|
50
|
+
properties["Type"] = this.type;
|
|
51
|
+
}
|
|
52
|
+
if (this.displayName != null) {
|
|
53
|
+
properties["DisplayName"] = this.displayName;
|
|
54
|
+
}
|
|
55
|
+
if (this.order != null) {
|
|
56
|
+
properties["Order"] = this.order;
|
|
57
|
+
}
|
|
58
|
+
return properties;
|
|
59
|
+
}
|
|
60
|
+
ref() {
|
|
61
|
+
return new FacetModelRef_1.default(this.namespaceName, this.field);
|
|
62
|
+
}
|
|
63
|
+
getAttrFacetModelId() {
|
|
64
|
+
return new func_1.GetAttr(this, "Item.FacetModelId", null);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.default = FacetModel;
|
|
68
|
+
//# sourceMappingURL=FacetModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacetModel.js","sourceRoot":"","sources":["FacetModel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAoD;AACpD,0CAAwC;AAExC,iFAAiD;AAKjD,MAAqB,UAAW,SAAQ,mBAAW;IAQ/C,YACI,KAAY,EACZ,aAAqB,EACrB,KAAa,EACb,IAAoB,EACpB,WAAmB,EACnB,UAAkC,IAAI;;QAEtC,KAAK,CACD,iBAAiB,GAAG,KAAK,CAC5B,CAAC;QAZW,UAAK,GAAgB,IAAI,CAAC;QAcvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,IAAI,CAAC;QACpC,KAAK,CAAC,WAAW,CACb,IAAI,CACP,CAAC;IACN,CAAC;IAGM,aAAa;QAEhB,OAAO,OAAO,CAAC;IACnB,CAAC;IAEM,YAAY;QAEf,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;SACpD;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QACD,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,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAEM,GAAG;QAEN,OAAO,IAAI,uBAAa,CACpB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,KAAM,CACd,CAAC;IACN,CAAC;IAEM,mBAAmB;QAEtB,OAAO,IAAI,cAAO,CACd,IAAI,EACJ,mBAAmB,EACnB,IAAI,CACP,CAAC;IACN,CAAC;CACJ;AAjFD,6BAiFC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
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 {CdkResource, Stack} from "../../core/model";
|
|
18
|
+
import {GetAttr} from "../../core/func";
|
|
19
|
+
|
|
20
|
+
import FacetModelRef from "../ref/FacetModelRef";
|
|
21
|
+
import { FacetModelType } from "./enums/FacetModelType";
|
|
22
|
+
|
|
23
|
+
import { FacetModelOptions } from "./options/FacetModelOptions";
|
|
24
|
+
|
|
25
|
+
export default class FacetModel extends CdkResource {
|
|
26
|
+
private readonly stack: Stack;
|
|
27
|
+
private readonly namespaceName: string;
|
|
28
|
+
private readonly field: string;
|
|
29
|
+
private readonly type: FacetModelType;
|
|
30
|
+
private readonly displayName: string;
|
|
31
|
+
private readonly order: number|null = null;
|
|
32
|
+
|
|
33
|
+
public constructor(
|
|
34
|
+
stack: Stack,
|
|
35
|
+
namespaceName: string,
|
|
36
|
+
field: string,
|
|
37
|
+
type: FacetModelType,
|
|
38
|
+
displayName: string,
|
|
39
|
+
options: FacetModelOptions|null = null,
|
|
40
|
+
) {
|
|
41
|
+
super(
|
|
42
|
+
"Log_FacetModel_" + field
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
this.stack = stack;
|
|
46
|
+
this.namespaceName = namespaceName;
|
|
47
|
+
this.field = field;
|
|
48
|
+
this.type = type;
|
|
49
|
+
this.displayName = displayName;
|
|
50
|
+
this.order = options?.order ?? null;
|
|
51
|
+
stack.addResource(
|
|
52
|
+
this,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
public alternateKeys(
|
|
58
|
+
) {
|
|
59
|
+
return "field";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public resourceType(
|
|
63
|
+
): string {
|
|
64
|
+
return "GS2::Log::FacetModel";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public properties(
|
|
68
|
+
): {[name: string]: any} {
|
|
69
|
+
let properties: {[name: string]: any} = {};
|
|
70
|
+
|
|
71
|
+
if (this.namespaceName != null) {
|
|
72
|
+
properties["NamespaceName"] = this.namespaceName;
|
|
73
|
+
}
|
|
74
|
+
if (this.field != null) {
|
|
75
|
+
properties["Field"] = this.field;
|
|
76
|
+
}
|
|
77
|
+
if (this.type != null) {
|
|
78
|
+
properties["Type"] = this.type;
|
|
79
|
+
}
|
|
80
|
+
if (this.displayName != null) {
|
|
81
|
+
properties["DisplayName"] = this.displayName;
|
|
82
|
+
}
|
|
83
|
+
if (this.order != null) {
|
|
84
|
+
properties["Order"] = this.order;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return properties;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public ref(
|
|
91
|
+
): FacetModelRef {
|
|
92
|
+
return new FacetModelRef(
|
|
93
|
+
this.namespaceName,
|
|
94
|
+
this.field!,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
public getAttrFacetModelId(
|
|
99
|
+
): GetAttr {
|
|
100
|
+
return new GetAttr(
|
|
101
|
+
this,
|
|
102
|
+
"Item.FacetModelId",
|
|
103
|
+
null,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FacetValueCountOptions } from "./options/FacetValueCountOptions";
|
|
2
|
+
export default class FacetValueCount {
|
|
3
|
+
private readonly value;
|
|
4
|
+
private readonly count;
|
|
5
|
+
constructor(value: string, count: number, options?: FacetValueCountOptions | null);
|
|
6
|
+
properties(): {
|
|
7
|
+
[name: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class FacetValueCount {
|
|
4
|
+
constructor(value, count, options = null) {
|
|
5
|
+
this.value = value;
|
|
6
|
+
this.count = count;
|
|
7
|
+
}
|
|
8
|
+
properties() {
|
|
9
|
+
let properties = {};
|
|
10
|
+
if (this.value != null) {
|
|
11
|
+
properties["value"] = this.value;
|
|
12
|
+
}
|
|
13
|
+
if (this.count != null) {
|
|
14
|
+
properties["count"] = this.count;
|
|
15
|
+
}
|
|
16
|
+
return properties;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = FacetValueCount;
|
|
20
|
+
//# sourceMappingURL=FacetValueCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacetValueCount.js","sourceRoot":"","sources":["FacetValueCount.ts"],"names":[],"mappings":";;AAiBA,MAAqB,eAAe;IAIhC,YACI,KAAa,EACb,KAAa,EACb,UAAuC,IAAI;QAE3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA1BD,kCA0BC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { FacetValueCountOptions } from "./options/FacetValueCountOptions";
|
|
17
|
+
|
|
18
|
+
export default class FacetValueCount {
|
|
19
|
+
private readonly value: string;
|
|
20
|
+
private readonly count: number;
|
|
21
|
+
|
|
22
|
+
public constructor(
|
|
23
|
+
value: string,
|
|
24
|
+
count: number,
|
|
25
|
+
options: FacetValueCountOptions|null = null,
|
|
26
|
+
) {
|
|
27
|
+
this.value = value;
|
|
28
|
+
this.count = count;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public properties(
|
|
32
|
+
): {[name: string]: any} {
|
|
33
|
+
let properties: {[name: string]: any} = {};
|
|
34
|
+
|
|
35
|
+
if (this.value != null) {
|
|
36
|
+
properties["value"] = this.value;
|
|
37
|
+
}
|
|
38
|
+
if (this.count != null) {
|
|
39
|
+
properties["count"] = this.count;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return properties;
|
|
43
|
+
}
|
|
44
|
+
}
|