gs2 1.4.116 → 1.4.118
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 +17 -0
- package/log/model/AggregationConfig.js +62 -0
- package/log/model/AggregationConfig.js.map +1 -0
- package/log/model/Dashboard.d.ts +43 -0
- package/log/model/Dashboard.js +199 -0
- package/log/model/Dashboard.js.map +1 -0
- package/log/model/Facet.d.ts +26 -0
- package/log/model/Facet.js +99 -0
- package/log/model/Facet.js.map +1 -0
- package/log/model/FacetModel.d.ts +35 -0
- package/log/model/FacetModel.js +171 -0
- package/log/model/FacetModel.js.map +1 -0
- package/log/model/FacetValueCount.d.ts +17 -0
- package/log/model/FacetValueCount.js +62 -0
- package/log/model/FacetValueCount.js.map +1 -0
- package/log/model/Label.d.ts +17 -0
- package/log/model/Label.js +62 -0
- package/log/model/Label.js.map +1 -0
- package/log/model/LogEntry.d.ts +30 -0
- package/log/model/LogEntry.js +112 -0
- package/log/model/LogEntry.js.map +1 -0
- package/log/model/MetricModel.d.ts +23 -0
- package/log/model/MetricModel.js +89 -0
- package/log/model/MetricModel.js.map +1 -0
- package/log/model/NumericRange.d.ts +17 -0
- package/log/model/NumericRange.js +62 -0
- package/log/model/NumericRange.js.map +1 -0
- package/log/model/TimeseriesMetadata.d.ts +17 -0
- package/log/model/TimeseriesMetadata.js +74 -0
- package/log/model/TimeseriesMetadata.js.map +1 -0
- package/log/model/TimeseriesPoint.d.ts +18 -0
- package/log/model/TimeseriesPoint.js +70 -0
- package/log/model/TimeseriesPoint.js.map +1 -0
- package/log/model/TimeseriesValue.d.ts +17 -0
- package/log/model/TimeseriesValue.js +62 -0
- package/log/model/TimeseriesValue.js.map +1 -0
- package/log/model/Trace.d.ts +22 -0
- package/log/model/Trace.js +84 -0
- package/log/model/Trace.js.map +1 -0
- package/log/model/index.d.ts +14 -1
- package/log/model/index.js +27 -1
- package/log/model/index.js.map +1 -1
- package/log/request/CreateDashboardRequest.d.ts +29 -0
- package/log/request/CreateDashboardRequest.js +97 -0
- package/log/request/CreateDashboardRequest.js.map +1 -0
- package/log/request/CreateFacetModelRequest.d.ts +37 -0
- package/log/request/CreateFacetModelRequest.js +125 -0
- package/log/request/CreateFacetModelRequest.js.map +1 -0
- package/log/request/DeleteDashboardRequest.d.ts +25 -0
- package/log/request/DeleteDashboardRequest.js +83 -0
- package/log/request/DeleteDashboardRequest.js.map +1 -0
- package/log/request/DeleteFacetModelRequest.d.ts +25 -0
- package/log/request/DeleteFacetModelRequest.js +83 -0
- package/log/request/DeleteFacetModelRequest.js.map +1 -0
- package/log/request/DescribeDashboardsRequest.d.ts +33 -0
- package/log/request/DescribeDashboardsRequest.js +111 -0
- package/log/request/DescribeDashboardsRequest.js.map +1 -0
- package/log/request/DescribeFacetModelsRequest.d.ts +33 -0
- package/log/request/DescribeFacetModelsRequest.js +111 -0
- package/log/request/DescribeFacetModelsRequest.js.map +1 -0
- package/log/request/DescribeLabelValuesRequest.d.ts +37 -0
- package/log/request/DescribeLabelValuesRequest.js +125 -0
- package/log/request/DescribeLabelValuesRequest.js.map +1 -0
- package/log/request/DescribeMetricsRequest.d.ts +33 -0
- package/log/request/DescribeMetricsRequest.js +111 -0
- package/log/request/DescribeMetricsRequest.js.map +1 -0
- package/log/request/DuplicateDashboardRequest.d.ts +25 -0
- package/log/request/DuplicateDashboardRequest.js +83 -0
- package/log/request/DuplicateDashboardRequest.js.map +1 -0
- package/log/request/GetDashboardRequest.d.ts +25 -0
- package/log/request/GetDashboardRequest.js +83 -0
- package/log/request/GetDashboardRequest.js.map +1 -0
- package/log/request/GetFacetModelRequest.d.ts +25 -0
- package/log/request/GetFacetModelRequest.js +83 -0
- package/log/request/GetFacetModelRequest.js.map +1 -0
- package/log/request/GetLogRequest.d.ts +33 -0
- package/log/request/GetLogRequest.js +111 -0
- package/log/request/GetLogRequest.js.map +1 -0
- package/log/request/GetTraceRequest.d.ts +33 -0
- package/log/request/GetTraceRequest.js +111 -0
- package/log/request/GetTraceRequest.js.map +1 -0
- package/log/request/QueryFacetsRequest.d.ts +33 -0
- package/log/request/QueryFacetsRequest.js +111 -0
- package/log/request/QueryFacetsRequest.js.map +1 -0
- package/log/request/QueryLogRequest.d.ts +41 -0
- package/log/request/QueryLogRequest.js +139 -0
- package/log/request/QueryLogRequest.js.map +1 -0
- package/log/request/QueryMetricsTimeseriesRequest.d.ts +58 -0
- package/log/request/QueryMetricsTimeseriesRequest.js +209 -0
- package/log/request/QueryMetricsTimeseriesRequest.js.map +1 -0
- package/log/request/QueryTimeseriesRequest.d.ts +58 -0
- package/log/request/QueryTimeseriesRequest.js +204 -0
- package/log/request/QueryTimeseriesRequest.js.map +1 -0
- package/log/request/UpdateDashboardRequest.d.ts +37 -0
- package/log/request/UpdateDashboardRequest.js +125 -0
- package/log/request/UpdateDashboardRequest.js.map +1 -0
- package/log/request/UpdateFacetModelRequest.d.ts +37 -0
- package/log/request/UpdateFacetModelRequest.js +125 -0
- package/log/request/UpdateFacetModelRequest.js.map +1 -0
- package/log/request/index.d.ts +20 -1
- package/log/request/index.js +39 -1
- package/log/request/index.js.map +1 -1
- package/log/rest.d.ts +19 -0
- package/log/rest.js +387 -0
- package/log/rest.js.map +1 -1
- package/log/result/CreateDashboardResult.d.ts +14 -0
- package/log/result/CreateDashboardResult.js +48 -0
- package/log/result/CreateDashboardResult.js.map +1 -0
- package/log/result/CreateFacetModelResult.d.ts +14 -0
- package/log/result/CreateFacetModelResult.js +48 -0
- package/log/result/CreateFacetModelResult.js.map +1 -0
- package/log/result/DeleteDashboardResult.d.ts +14 -0
- package/log/result/DeleteDashboardResult.js +48 -0
- package/log/result/DeleteDashboardResult.js.map +1 -0
- package/log/result/DeleteFacetModelResult.d.ts +14 -0
- package/log/result/DeleteFacetModelResult.js +48 -0
- package/log/result/DeleteFacetModelResult.js.map +1 -0
- package/log/result/DescribeDashboardsResult.d.ts +18 -0
- package/log/result/DescribeDashboardsResult.js +67 -0
- package/log/result/DescribeDashboardsResult.js.map +1 -0
- package/log/result/DescribeFacetModelsResult.d.ts +18 -0
- package/log/result/DescribeFacetModelsResult.js +67 -0
- package/log/result/DescribeFacetModelsResult.js.map +1 -0
- package/log/result/DescribeLabelValuesResult.d.ts +18 -0
- package/log/result/DescribeLabelValuesResult.js +67 -0
- package/log/result/DescribeLabelValuesResult.js.map +1 -0
- package/log/result/DescribeMetricsResult.d.ts +18 -0
- package/log/result/DescribeMetricsResult.js +67 -0
- package/log/result/DescribeMetricsResult.js.map +1 -0
- package/log/result/DuplicateDashboardResult.d.ts +14 -0
- package/log/result/DuplicateDashboardResult.js +48 -0
- package/log/result/DuplicateDashboardResult.js.map +1 -0
- package/log/result/GetDashboardResult.d.ts +14 -0
- package/log/result/GetDashboardResult.js +48 -0
- package/log/result/GetDashboardResult.js.map +1 -0
- package/log/result/GetFacetModelResult.d.ts +14 -0
- package/log/result/GetFacetModelResult.js +48 -0
- package/log/result/GetFacetModelResult.js.map +1 -0
- package/log/result/GetLogResult.d.ts +14 -0
- package/log/result/GetLogResult.js +48 -0
- package/log/result/GetLogResult.js.map +1 -0
- package/log/result/GetTraceResult.d.ts +22 -0
- package/log/result/GetTraceResult.js +82 -0
- package/log/result/GetTraceResult.js.map +1 -0
- package/log/result/QueryFacetsResult.d.ts +14 -0
- package/log/result/QueryFacetsResult.js +53 -0
- package/log/result/QueryFacetsResult.js.map +1 -0
- package/log/result/QueryLogResult.d.ts +22 -0
- package/log/result/QueryLogResult.js +81 -0
- package/log/result/QueryLogResult.js.map +1 -0
- package/log/result/QueryMetricsTimeseriesResult.d.ts +18 -0
- package/log/result/QueryMetricsTimeseriesResult.js +68 -0
- package/log/result/QueryMetricsTimeseriesResult.js.map +1 -0
- package/log/result/QueryTimeseriesResult.d.ts +22 -0
- package/log/result/QueryTimeseriesResult.js +82 -0
- package/log/result/QueryTimeseriesResult.js.map +1 -0
- package/log/result/UpdateDashboardResult.d.ts +14 -0
- package/log/result/UpdateDashboardResult.js +48 -0
- package/log/result/UpdateDashboardResult.js.map +1 -0
- package/log/result/UpdateFacetModelResult.d.ts +14 -0
- package/log/result/UpdateFacetModelResult.js +48 -0
- package/log/result/UpdateFacetModelResult.js.map +1 -0
- package/log/result/index.d.ts +20 -1
- package/log/result/index.js +39 -1
- package/log/result/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class AggregationConfig implements IModel {
|
|
3
|
+
private type;
|
|
4
|
+
private field;
|
|
5
|
+
getType(): string | null;
|
|
6
|
+
setType(type: string | null): this;
|
|
7
|
+
withType(type: string | null): this;
|
|
8
|
+
getField(): string | null;
|
|
9
|
+
setField(field: string | null): this;
|
|
10
|
+
withField(field: string | null): this;
|
|
11
|
+
static fromDict(data: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}): AggregationConfig | null;
|
|
14
|
+
toDict(): {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var AggregationConfig = /** @class */ (function () {
|
|
19
|
+
function AggregationConfig() {
|
|
20
|
+
this.type = null;
|
|
21
|
+
this.field = null;
|
|
22
|
+
}
|
|
23
|
+
AggregationConfig.prototype.getType = function () {
|
|
24
|
+
return this.type;
|
|
25
|
+
};
|
|
26
|
+
AggregationConfig.prototype.setType = function (type) {
|
|
27
|
+
this.type = type;
|
|
28
|
+
return this;
|
|
29
|
+
};
|
|
30
|
+
AggregationConfig.prototype.withType = function (type) {
|
|
31
|
+
this.type = type;
|
|
32
|
+
return this;
|
|
33
|
+
};
|
|
34
|
+
AggregationConfig.prototype.getField = function () {
|
|
35
|
+
return this.field;
|
|
36
|
+
};
|
|
37
|
+
AggregationConfig.prototype.setField = function (field) {
|
|
38
|
+
this.field = field;
|
|
39
|
+
return this;
|
|
40
|
+
};
|
|
41
|
+
AggregationConfig.prototype.withField = function (field) {
|
|
42
|
+
this.field = field;
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
AggregationConfig.fromDict = function (data) {
|
|
46
|
+
if (data == undefined || data == null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return new AggregationConfig()
|
|
50
|
+
.withType(data["type"])
|
|
51
|
+
.withField(data["field"]);
|
|
52
|
+
};
|
|
53
|
+
AggregationConfig.prototype.toDict = function () {
|
|
54
|
+
return {
|
|
55
|
+
"type": this.getType(),
|
|
56
|
+
"field": this.getField(),
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
return AggregationConfig;
|
|
60
|
+
}());
|
|
61
|
+
exports.default = AggregationConfig;
|
|
62
|
+
//# sourceMappingURL=AggregationConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AggregationConfig.js","sourceRoot":"","sources":["../../../src/log/model/AggregationConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAMH;IAAA;QACY,SAAI,GAAgB,IAAI,CAAC;QACzB,UAAK,GAAgB,IAAI,CAAC;IAuCtC,CAAC;IAtCU,mCAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACM,mCAAO,GAAd,UAAe,IAAiB;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,oCAAQ,GAAf,UAAgB,IAAiB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,oCAAQ,GAAf;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACM,oCAAQ,GAAf,UAAgB,KAAkB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,qCAAS,GAAhB,UAAiB,KAAkB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,0BAAQ,GAAtB,UAAuB,IAA0B;QAC7C,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,iBAAiB,EAAE;aACzB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,CAAC;IAEM,kCAAM,GAAb;QACI,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC;IACN,CAAC;IACL,wBAAC;AAAD,CAAC,AAzCD,IAyCC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class Dashboard implements IModel {
|
|
3
|
+
private dashboardId;
|
|
4
|
+
private name;
|
|
5
|
+
private displayName;
|
|
6
|
+
private description;
|
|
7
|
+
private payload;
|
|
8
|
+
private createdAt;
|
|
9
|
+
private updatedAt;
|
|
10
|
+
static getRegion(grn: string): string | null;
|
|
11
|
+
static getOwnerId(grn: string): string | null;
|
|
12
|
+
static getNamespaceName(grn: string): string | null;
|
|
13
|
+
static getDashboardName(grn: string): string | null;
|
|
14
|
+
static isValid(grn: string): boolean;
|
|
15
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, dashboardName: string | null): string | null;
|
|
16
|
+
getDashboardId(): string | null;
|
|
17
|
+
setDashboardId(dashboardId: string | null): this;
|
|
18
|
+
withDashboardId(dashboardId: string | null): this;
|
|
19
|
+
getName(): string | null;
|
|
20
|
+
setName(name: string | null): this;
|
|
21
|
+
withName(name: string | null): this;
|
|
22
|
+
getDisplayName(): string | null;
|
|
23
|
+
setDisplayName(displayName: string | null): this;
|
|
24
|
+
withDisplayName(displayName: string | null): this;
|
|
25
|
+
getDescription(): string | null;
|
|
26
|
+
setDescription(description: string | null): this;
|
|
27
|
+
withDescription(description: string | null): this;
|
|
28
|
+
getPayload(): string | null;
|
|
29
|
+
setPayload(payload: string | null): this;
|
|
30
|
+
withPayload(payload: string | null): this;
|
|
31
|
+
getCreatedAt(): number | null;
|
|
32
|
+
setCreatedAt(createdAt: number | null): this;
|
|
33
|
+
withCreatedAt(createdAt: number | null): this;
|
|
34
|
+
getUpdatedAt(): number | null;
|
|
35
|
+
setUpdatedAt(updatedAt: number | null): this;
|
|
36
|
+
withUpdatedAt(updatedAt: number | null): this;
|
|
37
|
+
static fromDict(data: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}): Dashboard | null;
|
|
40
|
+
toDict(): {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
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 grnFormat = "grn:gs2:{region}:{ownerId}:log:{namespaceName}:dashboard:{dashboardName}";
|
|
19
|
+
var Dashboard = /** @class */ (function () {
|
|
20
|
+
function Dashboard() {
|
|
21
|
+
this.dashboardId = null;
|
|
22
|
+
this.name = null;
|
|
23
|
+
this.displayName = null;
|
|
24
|
+
this.description = null;
|
|
25
|
+
this.payload = null;
|
|
26
|
+
this.createdAt = null;
|
|
27
|
+
this.updatedAt = null;
|
|
28
|
+
}
|
|
29
|
+
Dashboard.getRegion = function (grn) {
|
|
30
|
+
var match = grn.match(grnFormat
|
|
31
|
+
.replace('{region}', '(.*)')
|
|
32
|
+
.replace('{ownerId}', '.*')
|
|
33
|
+
.replace('{namespaceName}', '.*')
|
|
34
|
+
.replace('{dashboardName}', '.*'));
|
|
35
|
+
if (match) {
|
|
36
|
+
return match[1];
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
Dashboard.getOwnerId = function (grn) {
|
|
41
|
+
var match = grn.match(grnFormat
|
|
42
|
+
.replace('{region}', '.*')
|
|
43
|
+
.replace('{ownerId}', '(.*)')
|
|
44
|
+
.replace('{namespaceName}', '.*')
|
|
45
|
+
.replace('{dashboardName}', '.*'));
|
|
46
|
+
if (match) {
|
|
47
|
+
return match[1];
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
};
|
|
51
|
+
Dashboard.getNamespaceName = function (grn) {
|
|
52
|
+
var match = grn.match(grnFormat
|
|
53
|
+
.replace('{region}', '.*')
|
|
54
|
+
.replace('{ownerId}', '.*')
|
|
55
|
+
.replace('{namespaceName}', '(.*)')
|
|
56
|
+
.replace('{dashboardName}', '.*'));
|
|
57
|
+
if (match) {
|
|
58
|
+
return match[1];
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
};
|
|
62
|
+
Dashboard.getDashboardName = function (grn) {
|
|
63
|
+
var match = grn.match(grnFormat
|
|
64
|
+
.replace('{region}', '.*')
|
|
65
|
+
.replace('{ownerId}', '.*')
|
|
66
|
+
.replace('{namespaceName}', '.*')
|
|
67
|
+
.replace('{dashboardName}', '(.*)'));
|
|
68
|
+
if (match) {
|
|
69
|
+
return match[1];
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
};
|
|
73
|
+
Dashboard.isValid = function (grn) {
|
|
74
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (this.getDashboardName(grn) == null || this.getDashboardName(grn) === '') {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
};
|
|
88
|
+
Dashboard.createGrn = function (region, ownerId, namespaceName, dashboardName) {
|
|
89
|
+
return grnFormat
|
|
90
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
91
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
92
|
+
.replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
|
|
93
|
+
.replace('{dashboardName}', dashboardName !== null && dashboardName !== void 0 ? dashboardName : '');
|
|
94
|
+
};
|
|
95
|
+
Dashboard.prototype.getDashboardId = function () {
|
|
96
|
+
return this.dashboardId;
|
|
97
|
+
};
|
|
98
|
+
Dashboard.prototype.setDashboardId = function (dashboardId) {
|
|
99
|
+
this.dashboardId = dashboardId;
|
|
100
|
+
return this;
|
|
101
|
+
};
|
|
102
|
+
Dashboard.prototype.withDashboardId = function (dashboardId) {
|
|
103
|
+
this.dashboardId = dashboardId;
|
|
104
|
+
return this;
|
|
105
|
+
};
|
|
106
|
+
Dashboard.prototype.getName = function () {
|
|
107
|
+
return this.name;
|
|
108
|
+
};
|
|
109
|
+
Dashboard.prototype.setName = function (name) {
|
|
110
|
+
this.name = name;
|
|
111
|
+
return this;
|
|
112
|
+
};
|
|
113
|
+
Dashboard.prototype.withName = function (name) {
|
|
114
|
+
this.name = name;
|
|
115
|
+
return this;
|
|
116
|
+
};
|
|
117
|
+
Dashboard.prototype.getDisplayName = function () {
|
|
118
|
+
return this.displayName;
|
|
119
|
+
};
|
|
120
|
+
Dashboard.prototype.setDisplayName = function (displayName) {
|
|
121
|
+
this.displayName = displayName;
|
|
122
|
+
return this;
|
|
123
|
+
};
|
|
124
|
+
Dashboard.prototype.withDisplayName = function (displayName) {
|
|
125
|
+
this.displayName = displayName;
|
|
126
|
+
return this;
|
|
127
|
+
};
|
|
128
|
+
Dashboard.prototype.getDescription = function () {
|
|
129
|
+
return this.description;
|
|
130
|
+
};
|
|
131
|
+
Dashboard.prototype.setDescription = function (description) {
|
|
132
|
+
this.description = description;
|
|
133
|
+
return this;
|
|
134
|
+
};
|
|
135
|
+
Dashboard.prototype.withDescription = function (description) {
|
|
136
|
+
this.description = description;
|
|
137
|
+
return this;
|
|
138
|
+
};
|
|
139
|
+
Dashboard.prototype.getPayload = function () {
|
|
140
|
+
return this.payload;
|
|
141
|
+
};
|
|
142
|
+
Dashboard.prototype.setPayload = function (payload) {
|
|
143
|
+
this.payload = payload;
|
|
144
|
+
return this;
|
|
145
|
+
};
|
|
146
|
+
Dashboard.prototype.withPayload = function (payload) {
|
|
147
|
+
this.payload = payload;
|
|
148
|
+
return this;
|
|
149
|
+
};
|
|
150
|
+
Dashboard.prototype.getCreatedAt = function () {
|
|
151
|
+
return this.createdAt;
|
|
152
|
+
};
|
|
153
|
+
Dashboard.prototype.setCreatedAt = function (createdAt) {
|
|
154
|
+
this.createdAt = createdAt;
|
|
155
|
+
return this;
|
|
156
|
+
};
|
|
157
|
+
Dashboard.prototype.withCreatedAt = function (createdAt) {
|
|
158
|
+
this.createdAt = createdAt;
|
|
159
|
+
return this;
|
|
160
|
+
};
|
|
161
|
+
Dashboard.prototype.getUpdatedAt = function () {
|
|
162
|
+
return this.updatedAt;
|
|
163
|
+
};
|
|
164
|
+
Dashboard.prototype.setUpdatedAt = function (updatedAt) {
|
|
165
|
+
this.updatedAt = updatedAt;
|
|
166
|
+
return this;
|
|
167
|
+
};
|
|
168
|
+
Dashboard.prototype.withUpdatedAt = function (updatedAt) {
|
|
169
|
+
this.updatedAt = updatedAt;
|
|
170
|
+
return this;
|
|
171
|
+
};
|
|
172
|
+
Dashboard.fromDict = function (data) {
|
|
173
|
+
if (data == undefined || data == null) {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
return new Dashboard()
|
|
177
|
+
.withDashboardId(data["dashboardId"])
|
|
178
|
+
.withName(data["name"])
|
|
179
|
+
.withDisplayName(data["displayName"])
|
|
180
|
+
.withDescription(data["description"])
|
|
181
|
+
.withPayload(data["payload"])
|
|
182
|
+
.withCreatedAt(data["createdAt"])
|
|
183
|
+
.withUpdatedAt(data["updatedAt"]);
|
|
184
|
+
};
|
|
185
|
+
Dashboard.prototype.toDict = function () {
|
|
186
|
+
return {
|
|
187
|
+
"dashboardId": this.getDashboardId(),
|
|
188
|
+
"name": this.getName(),
|
|
189
|
+
"displayName": this.getDisplayName(),
|
|
190
|
+
"description": this.getDescription(),
|
|
191
|
+
"payload": this.getPayload(),
|
|
192
|
+
"createdAt": this.getCreatedAt(),
|
|
193
|
+
"updatedAt": this.getUpdatedAt(),
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
return Dashboard;
|
|
197
|
+
}());
|
|
198
|
+
exports.default = Dashboard;
|
|
199
|
+
//# sourceMappingURL=Dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../../../src/log/model/Dashboard.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAKH,IAAM,SAAS,GAAW,0EAA0E,CAAC;AAErG;IAAA;QACY,gBAAW,GAAgB,IAAI,CAAC;QAChC,SAAI,GAAgB,IAAI,CAAC;QACzB,gBAAW,GAAgB,IAAI,CAAC;QAChC,gBAAW,GAAgB,IAAI,CAAC;QAChC,YAAO,GAAgB,IAAI,CAAC;QAC5B,cAAS,GAAgB,IAAI,CAAC;QAC9B,cAAS,GAAgB,IAAI,CAAC;IAyL1C,CAAC;IAvLiB,mBAAS,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,iBAAiB,EAAE,IAAI,CAAC,CACpC,CAAC;QACF,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;SACnB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,oBAAU,GAAxB,UAAyB,GAAW;QAChC,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;aACzB,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC;aAC5B,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC;aAChC,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,CACpC,CAAC;QACF,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,C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core/interface/IModel';
|
|
2
|
+
import * as Gs2Log from '../../log/model';
|
|
3
|
+
export default class Facet implements IModel {
|
|
4
|
+
private field;
|
|
5
|
+
private values;
|
|
6
|
+
private range;
|
|
7
|
+
private globalRange;
|
|
8
|
+
getField(): string | null;
|
|
9
|
+
setField(field: string | null): this;
|
|
10
|
+
withField(field: string | null): this;
|
|
11
|
+
getValues(): Gs2Log.FacetValueCount[] | null;
|
|
12
|
+
setValues(values: Gs2Log.FacetValueCount[] | null): this;
|
|
13
|
+
withValues(values: Gs2Log.FacetValueCount[] | null): this;
|
|
14
|
+
getRange(): Gs2Log.NumericRange | null;
|
|
15
|
+
setRange(range: Gs2Log.NumericRange | null): this;
|
|
16
|
+
withRange(range: Gs2Log.NumericRange | null): this;
|
|
17
|
+
getGlobalRange(): Gs2Log.NumericRange | null;
|
|
18
|
+
setGlobalRange(globalRange: Gs2Log.NumericRange | null): this;
|
|
19
|
+
withGlobalRange(globalRange: Gs2Log.NumericRange | null): this;
|
|
20
|
+
static fromDict(data: {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}): Facet | null;
|
|
23
|
+
toDict(): {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 Gs2Log = tslib_1.__importStar(require("../../log/model"));
|
|
20
|
+
var Facet = /** @class */ (function () {
|
|
21
|
+
function Facet() {
|
|
22
|
+
this.field = null;
|
|
23
|
+
this.values = null;
|
|
24
|
+
this.range = null;
|
|
25
|
+
this.globalRange = null;
|
|
26
|
+
}
|
|
27
|
+
Facet.prototype.getField = function () {
|
|
28
|
+
return this.field;
|
|
29
|
+
};
|
|
30
|
+
Facet.prototype.setField = function (field) {
|
|
31
|
+
this.field = field;
|
|
32
|
+
return this;
|
|
33
|
+
};
|
|
34
|
+
Facet.prototype.withField = function (field) {
|
|
35
|
+
this.field = field;
|
|
36
|
+
return this;
|
|
37
|
+
};
|
|
38
|
+
Facet.prototype.getValues = function () {
|
|
39
|
+
return this.values;
|
|
40
|
+
};
|
|
41
|
+
Facet.prototype.setValues = function (values) {
|
|
42
|
+
this.values = values;
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
Facet.prototype.withValues = function (values) {
|
|
46
|
+
this.values = values;
|
|
47
|
+
return this;
|
|
48
|
+
};
|
|
49
|
+
Facet.prototype.getRange = function () {
|
|
50
|
+
return this.range;
|
|
51
|
+
};
|
|
52
|
+
Facet.prototype.setRange = function (range) {
|
|
53
|
+
this.range = range;
|
|
54
|
+
return this;
|
|
55
|
+
};
|
|
56
|
+
Facet.prototype.withRange = function (range) {
|
|
57
|
+
this.range = range;
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
60
|
+
Facet.prototype.getGlobalRange = function () {
|
|
61
|
+
return this.globalRange;
|
|
62
|
+
};
|
|
63
|
+
Facet.prototype.setGlobalRange = function (globalRange) {
|
|
64
|
+
this.globalRange = globalRange;
|
|
65
|
+
return this;
|
|
66
|
+
};
|
|
67
|
+
Facet.prototype.withGlobalRange = function (globalRange) {
|
|
68
|
+
this.globalRange = globalRange;
|
|
69
|
+
return this;
|
|
70
|
+
};
|
|
71
|
+
Facet.fromDict = function (data) {
|
|
72
|
+
if (data == undefined || data == null) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return new Facet()
|
|
76
|
+
.withField(data["field"])
|
|
77
|
+
.withValues(data.values ?
|
|
78
|
+
data.values.map(function (item) {
|
|
79
|
+
return Gs2Log.FacetValueCount.fromDict(item);
|
|
80
|
+
}) : null)
|
|
81
|
+
.withRange(Gs2Log.NumericRange.fromDict(data["range"]))
|
|
82
|
+
.withGlobalRange(Gs2Log.NumericRange.fromDict(data["globalRange"]));
|
|
83
|
+
};
|
|
84
|
+
Facet.prototype.toDict = function () {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
return {
|
|
87
|
+
"field": this.getField(),
|
|
88
|
+
"values": this.getValues() ?
|
|
89
|
+
this.getValues().map(function (item) {
|
|
90
|
+
return item.toDict();
|
|
91
|
+
}) : null,
|
|
92
|
+
"range": (_a = this.getRange()) === null || _a === void 0 ? void 0 : _a.toDict(),
|
|
93
|
+
"globalRange": (_b = this.getGlobalRange()) === null || _b === void 0 ? void 0 : _b.toDict(),
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
return Facet;
|
|
97
|
+
}());
|
|
98
|
+
exports.default = Facet;
|
|
99
|
+
//# sourceMappingURL=Facet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Facet.js","sourceRoot":"","sources":["../../../src/log/model/Facet.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,8DAAyC;AAIzC;IAAA;QACY,UAAK,GAAgB,IAAI,CAAC;QAC1B,WAAM,GAAkC,IAAI,CAAC;QAC7C,UAAK,GAA6B,IAAI,CAAC;QACvC,gBAAW,GAA6B,IAAI,CAAC;IAyEzD,CAAC;IAxEU,wBAAQ,GAAf;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACM,wBAAQ,GAAf,UAAgB,KAAkB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CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACxB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAC,IAA0B;gBACvC,OAAO,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjD,CAAC,CACJ,CAAC,CAAC,CAAC,IAAI,CAAC;aACR,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;aACtD,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEM,sBAAM,GAAb;;QACI,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxB,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;gBACxB,IAAI,CAAC,SAAS,EAAG,CAAC,GAAG,CAAC,UAAC,IAA4B;oBAC/C,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;gBACzB,CAAC,CACJ,CAAC,CAAC,CAAC,IAAI;YACR,OAAO,EAAE,MAAA,IAAI,CAAC,QAAQ,EAAE,0CAAE,MAAM,EAAE;YAClC,aAAa,EAAE,MAAA,IAAI,CAAC,cAAc,EAAE,0CAAE,MAAM,EAAE;SACjD,CAAC;IACN,CAAC;IACL,YAAC;AAAD,CAAC,AA7ED,IA6EC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class FacetModel implements IModel {
|
|
3
|
+
private facetModelId;
|
|
4
|
+
private field;
|
|
5
|
+
private type;
|
|
6
|
+
private displayName;
|
|
7
|
+
private order;
|
|
8
|
+
static getRegion(grn: string): string | null;
|
|
9
|
+
static getOwnerId(grn: string): string | null;
|
|
10
|
+
static getNamespaceName(grn: string): string | null;
|
|
11
|
+
static getField(grn: string): string | null;
|
|
12
|
+
static isValid(grn: string): boolean;
|
|
13
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, field: string | null): string | null;
|
|
14
|
+
getFacetModelId(): string | null;
|
|
15
|
+
setFacetModelId(facetModelId: string | null): this;
|
|
16
|
+
withFacetModelId(facetModelId: string | null): this;
|
|
17
|
+
getField(): string | null;
|
|
18
|
+
setField(field: string | null): this;
|
|
19
|
+
withField(field: string | null): this;
|
|
20
|
+
getType(): string | null;
|
|
21
|
+
setType(type: string | null): this;
|
|
22
|
+
withType(type: string | null): this;
|
|
23
|
+
getDisplayName(): string | null;
|
|
24
|
+
setDisplayName(displayName: string | null): this;
|
|
25
|
+
withDisplayName(displayName: string | null): this;
|
|
26
|
+
getOrder(): number | null;
|
|
27
|
+
setOrder(order: number | null): this;
|
|
28
|
+
withOrder(order: number | null): this;
|
|
29
|
+
static fromDict(data: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}): FacetModel | null;
|
|
32
|
+
toDict(): {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
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 grnFormat = "grn:gs2:{region}:{ownerId}:log:{namespaceName}:model:facet:{field}";
|
|
19
|
+
var FacetModel = /** @class */ (function () {
|
|
20
|
+
function FacetModel() {
|
|
21
|
+
this.facetModelId = null;
|
|
22
|
+
this.field = null;
|
|
23
|
+
this.type = null;
|
|
24
|
+
this.displayName = null;
|
|
25
|
+
this.order = null;
|
|
26
|
+
}
|
|
27
|
+
FacetModel.getRegion = function (grn) {
|
|
28
|
+
var match = grn.match(grnFormat
|
|
29
|
+
.replace('{region}', '(.*)')
|
|
30
|
+
.replace('{ownerId}', '.*')
|
|
31
|
+
.replace('{namespaceName}', '.*')
|
|
32
|
+
.replace('{field}', '.*'));
|
|
33
|
+
if (match) {
|
|
34
|
+
return match[1];
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
};
|
|
38
|
+
FacetModel.getOwnerId = function (grn) {
|
|
39
|
+
var match = grn.match(grnFormat
|
|
40
|
+
.replace('{region}', '.*')
|
|
41
|
+
.replace('{ownerId}', '(.*)')
|
|
42
|
+
.replace('{namespaceName}', '.*')
|
|
43
|
+
.replace('{field}', '.*'));
|
|
44
|
+
if (match) {
|
|
45
|
+
return match[1];
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
FacetModel.getNamespaceName = function (grn) {
|
|
50
|
+
var match = grn.match(grnFormat
|
|
51
|
+
.replace('{region}', '.*')
|
|
52
|
+
.replace('{ownerId}', '.*')
|
|
53
|
+
.replace('{namespaceName}', '(.*)')
|
|
54
|
+
.replace('{field}', '.*'));
|
|
55
|
+
if (match) {
|
|
56
|
+
return match[1];
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
};
|
|
60
|
+
FacetModel.getField = function (grn) {
|
|
61
|
+
var match = grn.match(grnFormat
|
|
62
|
+
.replace('{region}', '.*')
|
|
63
|
+
.replace('{ownerId}', '.*')
|
|
64
|
+
.replace('{namespaceName}', '.*')
|
|
65
|
+
.replace('{field}', '(.*)'));
|
|
66
|
+
if (match) {
|
|
67
|
+
return match[1];
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
};
|
|
71
|
+
FacetModel.isValid = function (grn) {
|
|
72
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (this.getField(grn) == null || this.getField(grn) === '') {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
};
|
|
86
|
+
FacetModel.createGrn = function (region, ownerId, namespaceName, field) {
|
|
87
|
+
return grnFormat
|
|
88
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
89
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
90
|
+
.replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
|
|
91
|
+
.replace('{field}', field !== null && field !== void 0 ? field : '');
|
|
92
|
+
};
|
|
93
|
+
FacetModel.prototype.getFacetModelId = function () {
|
|
94
|
+
return this.facetModelId;
|
|
95
|
+
};
|
|
96
|
+
FacetModel.prototype.setFacetModelId = function (facetModelId) {
|
|
97
|
+
this.facetModelId = facetModelId;
|
|
98
|
+
return this;
|
|
99
|
+
};
|
|
100
|
+
FacetModel.prototype.withFacetModelId = function (facetModelId) {
|
|
101
|
+
this.facetModelId = facetModelId;
|
|
102
|
+
return this;
|
|
103
|
+
};
|
|
104
|
+
FacetModel.prototype.getField = function () {
|
|
105
|
+
return this.field;
|
|
106
|
+
};
|
|
107
|
+
FacetModel.prototype.setField = function (field) {
|
|
108
|
+
this.field = field;
|
|
109
|
+
return this;
|
|
110
|
+
};
|
|
111
|
+
FacetModel.prototype.withField = function (field) {
|
|
112
|
+
this.field = field;
|
|
113
|
+
return this;
|
|
114
|
+
};
|
|
115
|
+
FacetModel.prototype.getType = function () {
|
|
116
|
+
return this.type;
|
|
117
|
+
};
|
|
118
|
+
FacetModel.prototype.setType = function (type) {
|
|
119
|
+
this.type = type;
|
|
120
|
+
return this;
|
|
121
|
+
};
|
|
122
|
+
FacetModel.prototype.withType = function (type) {
|
|
123
|
+
this.type = type;
|
|
124
|
+
return this;
|
|
125
|
+
};
|
|
126
|
+
FacetModel.prototype.getDisplayName = function () {
|
|
127
|
+
return this.displayName;
|
|
128
|
+
};
|
|
129
|
+
FacetModel.prototype.setDisplayName = function (displayName) {
|
|
130
|
+
this.displayName = displayName;
|
|
131
|
+
return this;
|
|
132
|
+
};
|
|
133
|
+
FacetModel.prototype.withDisplayName = function (displayName) {
|
|
134
|
+
this.displayName = displayName;
|
|
135
|
+
return this;
|
|
136
|
+
};
|
|
137
|
+
FacetModel.prototype.getOrder = function () {
|
|
138
|
+
return this.order;
|
|
139
|
+
};
|
|
140
|
+
FacetModel.prototype.setOrder = function (order) {
|
|
141
|
+
this.order = order;
|
|
142
|
+
return this;
|
|
143
|
+
};
|
|
144
|
+
FacetModel.prototype.withOrder = function (order) {
|
|
145
|
+
this.order = order;
|
|
146
|
+
return this;
|
|
147
|
+
};
|
|
148
|
+
FacetModel.fromDict = function (data) {
|
|
149
|
+
if (data == undefined || data == null) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
return new FacetModel()
|
|
153
|
+
.withFacetModelId(data["facetModelId"])
|
|
154
|
+
.withField(data["field"])
|
|
155
|
+
.withType(data["type"])
|
|
156
|
+
.withDisplayName(data["displayName"])
|
|
157
|
+
.withOrder(data["order"]);
|
|
158
|
+
};
|
|
159
|
+
FacetModel.prototype.toDict = function () {
|
|
160
|
+
return {
|
|
161
|
+
"facetModelId": this.getFacetModelId(),
|
|
162
|
+
"field": this.getField(),
|
|
163
|
+
"type": this.getType(),
|
|
164
|
+
"displayName": this.getDisplayName(),
|
|
165
|
+
"order": this.getOrder(),
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
return FacetModel;
|
|
169
|
+
}());
|
|
170
|
+
exports.default = FacetModel;
|
|
171
|
+
//# sourceMappingURL=FacetModel.js.map
|