-
Notifications
You must be signed in to change notification settings - Fork 10
/
AnalyticsMetricsQueryRequest.ts
74 lines (64 loc) · 1.9 KB
/
AnalyticsMetricsQueryRequest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import {map, mapArray} from '../common/Mapper';
import AnalyticsAbstractFilter from './AnalyticsAbstractFilter';
import AnalyticsAttribute from './AnalyticsAttribute';
import AnalyticsInterval from './AnalyticsInterval';
import AnalyticsOrderByEntry from './AnalyticsOrderByEntry';
import AnalyticsQueryTimeframe from './AnalyticsQueryTimeframe';
/**
* @export
* @class AnalyticsMetricsQueryRequest
*/
export class AnalyticsMetricsQueryRequest extends AnalyticsQueryTimeframe {
/**
* Analytics license key (required)
* @type {string}
* @memberof AnalyticsMetricsQueryRequest
*/
public licenseKey?: string;
/**
* @type {AnalyticsAbstractFilter[]}
* @memberof AnalyticsMetricsQueryRequest
*/
public filters?: AnalyticsAbstractFilter[];
/**
* @type {AnalyticsOrderByEntry[]}
* @memberof AnalyticsMetricsQueryRequest
*/
public orderBy?: AnalyticsOrderByEntry[];
/**
* @type {AnalyticsInterval}
* @memberof AnalyticsMetricsQueryRequest
*/
public interval?: AnalyticsInterval;
/**
* @type {AnalyticsAttribute[]}
* @memberof AnalyticsMetricsQueryRequest
*/
public groupBy?: AnalyticsAttribute[];
/**
* Maximum number of rows returned (max. 200)
* @type {number}
* @memberof AnalyticsMetricsQueryRequest
*/
public limit?: number;
/**
* Offset of data used for pagination
* @type {number}
* @memberof AnalyticsMetricsQueryRequest
*/
public offset?: number;
constructor(obj?: Partial<AnalyticsMetricsQueryRequest>) {
super(obj);
if(!obj) {
return;
}
this.licenseKey = map(obj.licenseKey);
this.filters = mapArray(obj.filters, AnalyticsAbstractFilter);
this.orderBy = mapArray(obj.orderBy, AnalyticsOrderByEntry);
this.interval = map(obj.interval);
this.groupBy = mapArray(obj.groupBy);
this.limit = map(obj.limit);
this.offset = map(obj.offset);
}
}
export default AnalyticsMetricsQueryRequest;