-
Notifications
You must be signed in to change notification settings - Fork 10
/
AdAnalyticsQueryRequest.ts
82 lines (71 loc) · 2.19 KB
/
AdAnalyticsQueryRequest.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
74
75
76
77
78
79
80
81
import {map, mapArray} from '../common/Mapper';
import AdAnalyticsAbstractFilter from './AdAnalyticsAbstractFilter';
import AdAnalyticsAttribute from './AdAnalyticsAttribute';
import AdAnalyticsOrderByEntry from './AdAnalyticsOrderByEntry';
import AnalyticsInterval from './AnalyticsInterval';
import AnalyticsQueryTimeframe from './AnalyticsQueryTimeframe';
/**
* @export
* @class AdAnalyticsQueryRequest
*/
export class AdAnalyticsQueryRequest extends AnalyticsQueryTimeframe {
/**
* Analytics license key (required)
* @type {string}
* @memberof AdAnalyticsQueryRequest
*/
public licenseKey?: string;
/**
* Analytics Query Filters Each filter requires 3 properties: name, operator and value. Valid operators are [IN, EQ, NE, LT, LTE, GT, GTE, CONTAINS, NOTCONTAINS]
* @type {AdAnalyticsAbstractFilter[]}
* @memberof AdAnalyticsQueryRequest
*/
public filters?: AdAnalyticsAbstractFilter[];
/**
* @type {AdAnalyticsOrderByEntry[]}
* @memberof AdAnalyticsQueryRequest
*/
public orderBy?: AdAnalyticsOrderByEntry[];
/**
* @type {AdAnalyticsAttribute}
* @memberof AdAnalyticsQueryRequest
*/
public dimension?: AdAnalyticsAttribute;
/**
* @type {AnalyticsInterval}
* @memberof AdAnalyticsQueryRequest
*/
public interval?: AnalyticsInterval;
/**
* @type {AdAnalyticsAttribute[]}
* @memberof AdAnalyticsQueryRequest
*/
public groupBy?: AdAnalyticsAttribute[];
/**
* Maximum number of rows returned (max. 200)
* @type {number}
* @memberof AdAnalyticsQueryRequest
*/
public limit?: number;
/**
* Offset of data
* @type {number}
* @memberof AdAnalyticsQueryRequest
*/
public offset?: number;
constructor(obj?: Partial<AdAnalyticsQueryRequest>) {
super(obj);
if(!obj) {
return;
}
this.licenseKey = map(obj.licenseKey);
this.filters = mapArray(obj.filters, AdAnalyticsAbstractFilter);
this.orderBy = mapArray(obj.orderBy, AdAnalyticsOrderByEntry);
this.dimension = map(obj.dimension);
this.interval = map(obj.interval);
this.groupBy = mapArray(obj.groupBy);
this.limit = map(obj.limit);
this.offset = map(obj.offset);
}
}
export default AdAnalyticsQueryRequest;