-
Notifications
You must be signed in to change notification settings - Fork 10
/
AnalyticsLicense.ts
186 lines (162 loc) · 4.74 KB
/
AnalyticsLicense.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
import {map, mapArray} from '../common/Mapper';
import AnalyticsLicenseCustomDataFieldLabels from './AnalyticsLicenseCustomDataFieldLabels';
import AnalyticsLicenseDomain from './AnalyticsLicenseDomain';
import AnalyticsLicenseFeatures from './AnalyticsLicenseFeatures';
/**
* @export
* @class AnalyticsLicense
*/
export class AnalyticsLicense {
/**
* Id of the Analytics License
* @type {string}
* @memberof AnalyticsLicense
*/
public id?: string;
/**
* Creation date of the Analytics License, returned as ISO 8601 date-time format
* @type {Date}
* @memberof AnalyticsLicense
*/
public createdAt?: Date;
/**
* User-specific meta data. This can hold anything.
* @type {{ [key: string]: any; }}
* @memberof AnalyticsLicense
*/
public customData?: { [key: string]: any; };
/**
* License Key
* @type {string}
* @memberof AnalyticsLicense
*/
public licenseKey?: string;
/**
* Name of the Analytics License
* @type {string}
* @memberof AnalyticsLicense
*/
public name?: string;
/**
* The industry of the organization associated with the Analytics License
* @type {string}
* @memberof AnalyticsLicense
*/
public industry?: string;
/**
* The subindustry of the organization associated with the Analytics License
* @type {string}
* @memberof AnalyticsLicense
*/
public subIndustry?: string;
/**
* Whether the Do Not Track request from the browser should be ignored
* @type {boolean}
* @memberof AnalyticsLicense
*/
public ignoreDNT?: boolean;
/**
* Number of impressions recorded
* @type {number}
* @memberof AnalyticsLicense
*/
public impressions?: number;
/**
* Maximum number of impressions
* @type {number}
* @memberof AnalyticsLicense
*/
public maxImpressions?: number;
/**
* The timezone of the Analytics License
* @type {string}
* @memberof AnalyticsLicense
*/
public timeZone?: string;
/**
* Retention time of impressions, returned as ISO 8601 duration format: P(n)Y(n)M(n)DT(n)H(n)M(n)S
* @type {string}
* @memberof AnalyticsLicense
*/
public retentionTime?: string;
/**
* Retention time for compressed data, returned as ISO 8601 duration format: P(n)Y(n)M(n)DT(n)H(n)M(n)S
* @type {string}
* @memberof AnalyticsLicense
*/
public compressedRetentionTime?: string;
/**
* Whitelisted domains
* @type {AnalyticsLicenseDomain[]}
* @memberof AnalyticsLicense
*/
public domains?: AnalyticsLicenseDomain[];
/**
* Whether the data of this license should be included in the industry insights or not
* @type {boolean}
* @memberof AnalyticsLicense
*/
public includeInInsights?: boolean;
/**
* Labels for CustomData fields
* @type {AnalyticsLicenseCustomDataFieldLabels}
* @memberof AnalyticsLicense
*/
public customDataFieldLabels?: AnalyticsLicenseCustomDataFieldLabels;
/**
* The number of customData fields available
* @type {number}
* @memberof AnalyticsLicense
*/
public customDataFieldsCount?: number;
/**
* Order index of license
* @type {number}
* @memberof AnalyticsLicense
*/
public orderIndex?: number;
/**
* The rate limit of this license
* @type {string}
* @memberof AnalyticsLicense
*/
public rateLimit?: string;
/**
* @type {AnalyticsLicenseFeatures}
* @memberof AnalyticsLicense
*/
public features?: AnalyticsLicenseFeatures;
/**
* The expiration date of the license if applicable, returned as ISO 8601 date-time format
* @type {Date}
* @memberof AnalyticsLicense
*/
public planExpiredAt?: Date;
constructor(obj?: Partial<AnalyticsLicense>) {
if(!obj) {
return;
}
this.id = map(obj.id);
this.createdAt = map(obj.createdAt, Date);
this.customData = map(obj.customData);
this.licenseKey = map(obj.licenseKey);
this.name = map(obj.name);
this.industry = map(obj.industry);
this.subIndustry = map(obj.subIndustry);
this.ignoreDNT = map(obj.ignoreDNT);
this.impressions = map(obj.impressions);
this.maxImpressions = map(obj.maxImpressions);
this.timeZone = map(obj.timeZone);
this.retentionTime = map(obj.retentionTime);
this.compressedRetentionTime = map(obj.compressedRetentionTime);
this.domains = mapArray(obj.domains, AnalyticsLicenseDomain);
this.includeInInsights = map(obj.includeInInsights);
this.customDataFieldLabels = map(obj.customDataFieldLabels, AnalyticsLicenseCustomDataFieldLabels);
this.customDataFieldsCount = map(obj.customDataFieldsCount);
this.orderIndex = map(obj.orderIndex);
this.rateLimit = map(obj.rateLimit);
this.features = map(obj.features, AnalyticsLicenseFeatures);
this.planExpiredAt = map(obj.planExpiredAt, Date);
}
}
export default AnalyticsLicense;