|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Yandex\Metrica\Stat\Models; |
|
4
|
|
|
|
|
5
|
|
|
use Yandex\Common\Model; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Class Query |
|
9
|
|
|
* @package Yandex\Metrica\Stat\Models |
|
10
|
|
|
*/ |
|
11
|
|
|
class Query extends Model |
|
12
|
|
|
{ |
|
13
|
|
|
protected $id = null; |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* Identifiers of counters. Used instead of the parameter id. |
|
17
|
|
|
* @var int[] |
|
18
|
|
|
*/ |
|
19
|
|
|
protected $ids = null; |
|
20
|
|
|
|
|
21
|
|
|
protected $preset = null; |
|
22
|
|
|
|
|
23
|
|
|
protected $dimensions = null; |
|
24
|
|
|
|
|
25
|
|
|
protected $metrics = null; |
|
26
|
|
|
|
|
27
|
|
|
protected $sort = null; |
|
28
|
|
|
|
|
29
|
|
|
protected $limit = null; |
|
30
|
|
|
|
|
31
|
|
|
protected $offset = null; |
|
32
|
|
|
|
|
33
|
|
|
protected $date1 = null; |
|
34
|
|
|
|
|
35
|
|
|
protected $date2 = null; |
|
36
|
|
|
|
|
37
|
|
|
protected $filters = null; |
|
38
|
|
|
|
|
39
|
|
|
protected $group = null; |
|
40
|
|
|
|
|
41
|
|
|
protected $autoGroupType = null; |
|
42
|
|
|
|
|
43
|
|
|
protected $autoGroupSize = null; |
|
44
|
|
|
|
|
45
|
|
|
protected $mappingClasses = []; |
|
46
|
|
|
|
|
47
|
|
|
protected $propNameMap = [ |
|
48
|
|
|
'auto_group_type' => 'autoGroupType', |
|
49
|
|
|
'auto_group_size' => 'autoGroupSize' |
|
50
|
|
|
]; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* Retrieve the id property |
|
54
|
|
|
* |
|
55
|
|
|
* @return int|null |
|
56
|
|
|
*/ |
|
57
|
8 |
|
public function getId() |
|
58
|
|
|
{ |
|
59
|
8 |
|
return $this->id; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* Set the id property |
|
64
|
|
|
* |
|
65
|
|
|
* @param int $id |
|
66
|
|
|
* @return $this |
|
67
|
|
|
*/ |
|
68
|
5 |
|
public function setId($id) |
|
69
|
|
|
{ |
|
70
|
5 |
|
$this->id = $id; |
|
71
|
5 |
|
return $this; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* Retrieve the ids property |
|
77
|
|
|
* |
|
78
|
|
|
* @return int[]|null |
|
79
|
|
|
*/ |
|
80
|
1 |
|
public function getIds() |
|
81
|
|
|
{ |
|
82
|
1 |
|
return $this->ids; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* Set the ids property |
|
87
|
|
|
* |
|
88
|
|
|
* @param int[] $ids |
|
89
|
|
|
* @return $this |
|
90
|
|
|
*/ |
|
91
|
1 |
|
public function setIds($ids) |
|
92
|
|
|
{ |
|
93
|
1 |
|
$this->ids = $ids; |
|
94
|
1 |
|
return $this; |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* Retrieve the preset property |
|
99
|
|
|
* |
|
100
|
|
|
* @return string|null |
|
101
|
|
|
*/ |
|
102
|
2 |
|
public function getPreset() |
|
103
|
|
|
{ |
|
104
|
2 |
|
return $this->preset; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* Set the preset property |
|
109
|
|
|
* |
|
110
|
|
|
* @param string $preset |
|
111
|
|
|
* @return $this |
|
112
|
|
|
*/ |
|
113
|
1 |
|
public function setPreset($preset) |
|
114
|
|
|
{ |
|
115
|
1 |
|
$this->preset = $preset; |
|
116
|
1 |
|
return $this; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* Retrieve the dimensions property |
|
121
|
|
|
* |
|
122
|
|
|
* @return array|null |
|
123
|
|
|
*/ |
|
124
|
9 |
|
public function getDimensions() |
|
125
|
|
|
{ |
|
126
|
9 |
|
return $this->dimensions; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* Set the dimensions property |
|
131
|
|
|
* |
|
132
|
|
|
* @param array $dimensions |
|
133
|
|
|
* @return $this |
|
134
|
|
|
*/ |
|
135
|
6 |
|
public function setDimensions($dimensions) |
|
136
|
|
|
{ |
|
137
|
6 |
|
$this->dimensions = $dimensions; |
|
138
|
6 |
|
return $this; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
/** |
|
142
|
|
|
* Retrieve the metrics property |
|
143
|
|
|
* |
|
144
|
|
|
* @return array|null |
|
145
|
|
|
*/ |
|
146
|
9 |
|
public function getMetrics() |
|
147
|
|
|
{ |
|
148
|
9 |
|
return $this->metrics; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* Set the metrics property |
|
153
|
|
|
* |
|
154
|
|
|
* @param array $metrics |
|
155
|
|
|
* @return $this |
|
156
|
|
|
*/ |
|
157
|
6 |
|
public function setMetrics($metrics) |
|
158
|
|
|
{ |
|
159
|
6 |
|
$this->metrics = $metrics; |
|
160
|
6 |
|
return $this; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* Retrieve the sort property |
|
165
|
|
|
* |
|
166
|
|
|
* @return array|null |
|
167
|
|
|
*/ |
|
168
|
9 |
|
public function getSort() |
|
169
|
|
|
{ |
|
170
|
9 |
|
return $this->sort; |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
/** |
|
174
|
|
|
* Set the sort property |
|
175
|
|
|
* |
|
176
|
|
|
* @param array $sort |
|
177
|
|
|
* @return $this |
|
178
|
|
|
*/ |
|
179
|
6 |
|
public function setSort($sort) |
|
180
|
|
|
{ |
|
181
|
6 |
|
$this->sort = $sort; |
|
182
|
6 |
|
return $this; |
|
183
|
|
|
} |
|
184
|
|
|
|
|
185
|
|
|
/** |
|
186
|
|
|
* Retrieve the limit property |
|
187
|
|
|
* |
|
188
|
|
|
* @return int|null |
|
189
|
|
|
*/ |
|
190
|
5 |
|
public function getLimit() |
|
191
|
|
|
{ |
|
192
|
5 |
|
return $this->limit; |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
/** |
|
196
|
|
|
* Set the limit property |
|
197
|
|
|
* |
|
198
|
|
|
* @param int $limit |
|
199
|
|
|
* @return $this |
|
200
|
|
|
*/ |
|
201
|
3 |
|
public function setLimit($limit) |
|
202
|
|
|
{ |
|
203
|
3 |
|
$this->limit = $limit; |
|
204
|
3 |
|
return $this; |
|
205
|
|
|
} |
|
206
|
|
|
|
|
207
|
|
|
/** |
|
208
|
|
|
* Retrieve the offset property |
|
209
|
|
|
* |
|
210
|
|
|
* @return int|null |
|
211
|
|
|
*/ |
|
212
|
5 |
|
public function getOffset() |
|
213
|
|
|
{ |
|
214
|
5 |
|
return $this->offset; |
|
215
|
|
|
} |
|
216
|
|
|
|
|
217
|
|
|
/** |
|
218
|
|
|
* Set the offset property |
|
219
|
|
|
* |
|
220
|
|
|
* @param int $offset |
|
221
|
|
|
* @return $this |
|
222
|
|
|
*/ |
|
223
|
3 |
|
public function setOffset($offset) |
|
224
|
|
|
{ |
|
225
|
3 |
|
$this->offset = $offset; |
|
226
|
3 |
|
return $this; |
|
227
|
|
|
} |
|
228
|
|
|
|
|
229
|
|
|
/** |
|
230
|
|
|
* Retrieve the date1 property |
|
231
|
|
|
* |
|
232
|
|
|
* @return string|null |
|
233
|
|
|
*/ |
|
234
|
9 |
|
public function getDate1() |
|
235
|
|
|
{ |
|
236
|
9 |
|
return $this->date1; |
|
237
|
|
|
} |
|
238
|
|
|
|
|
239
|
|
|
/** |
|
240
|
|
|
* Set the date1 property |
|
241
|
|
|
* |
|
242
|
|
|
* @param string $date1 |
|
243
|
|
|
* @return $this |
|
244
|
|
|
*/ |
|
245
|
6 |
|
public function setDate1($date1) |
|
246
|
|
|
{ |
|
247
|
6 |
|
$this->date1 = $date1; |
|
248
|
6 |
|
return $this; |
|
249
|
|
|
} |
|
250
|
|
|
|
|
251
|
|
|
/** |
|
252
|
|
|
* Retrieve the date2 property |
|
253
|
|
|
* |
|
254
|
|
|
* @return string|null |
|
255
|
|
|
*/ |
|
256
|
9 |
|
public function getDate2() |
|
257
|
|
|
{ |
|
258
|
9 |
|
return $this->date2; |
|
259
|
|
|
} |
|
260
|
|
|
|
|
261
|
|
|
/** |
|
262
|
|
|
* Set the date2 property |
|
263
|
|
|
* |
|
264
|
|
|
* @param string $date2 |
|
265
|
|
|
* @return $this |
|
266
|
|
|
*/ |
|
267
|
6 |
|
public function setDate2($date2) |
|
268
|
|
|
{ |
|
269
|
6 |
|
$this->date2 = $date2; |
|
270
|
6 |
|
return $this; |
|
271
|
|
|
} |
|
272
|
|
|
|
|
273
|
|
|
/** |
|
274
|
|
|
* Retrieve the filters property |
|
275
|
|
|
* |
|
276
|
|
|
* @return string|null |
|
277
|
|
|
*/ |
|
278
|
1 |
|
public function getFilters() |
|
279
|
|
|
{ |
|
280
|
1 |
|
return $this->filters; |
|
281
|
|
|
} |
|
282
|
|
|
|
|
283
|
|
|
/** |
|
284
|
|
|
* Set the filters property |
|
285
|
|
|
* |
|
286
|
|
|
* @param string $filters |
|
287
|
|
|
* @return $this |
|
288
|
|
|
*/ |
|
289
|
1 |
|
public function setFilters($filters) |
|
290
|
|
|
{ |
|
291
|
1 |
|
$this->filters = $filters; |
|
292
|
1 |
|
return $this; |
|
293
|
|
|
} |
|
294
|
|
|
|
|
295
|
|
|
/** |
|
296
|
|
|
* Retrieve the group property |
|
297
|
|
|
* |
|
298
|
|
|
* @return string|null |
|
299
|
|
|
*/ |
|
300
|
2 |
|
public function getGroup() |
|
301
|
|
|
{ |
|
302
|
2 |
|
return $this->group; |
|
303
|
|
|
} |
|
304
|
|
|
|
|
305
|
|
|
/** |
|
306
|
|
|
* Set the group property |
|
307
|
|
|
* |
|
308
|
|
|
* @param string $group |
|
309
|
|
|
* @return $this |
|
310
|
|
|
*/ |
|
311
|
2 |
|
public function setGroup($group) |
|
312
|
|
|
{ |
|
313
|
2 |
|
$this->group = $group; |
|
314
|
2 |
|
return $this; |
|
315
|
|
|
} |
|
316
|
|
|
|
|
317
|
|
|
/** |
|
318
|
|
|
* Retrieve the autoGroupType property |
|
319
|
|
|
* |
|
320
|
|
|
* @return string|null |
|
321
|
|
|
*/ |
|
322
|
2 |
|
public function getAutoGroupType() |
|
323
|
|
|
{ |
|
324
|
2 |
|
return $this->autoGroupType; |
|
325
|
|
|
} |
|
326
|
|
|
|
|
327
|
|
|
/** |
|
328
|
|
|
* Set the autoGroupType property |
|
329
|
|
|
* |
|
330
|
|
|
* @param string $autoGroupType |
|
331
|
|
|
* @return $this |
|
332
|
|
|
*/ |
|
333
|
2 |
|
public function setAutoGroupType($autoGroupType) |
|
334
|
|
|
{ |
|
335
|
2 |
|
$this->autoGroupType = $autoGroupType; |
|
336
|
2 |
|
return $this; |
|
337
|
|
|
} |
|
338
|
|
|
|
|
339
|
|
|
/** |
|
340
|
|
|
* Retrieve the autoGroupSize property |
|
341
|
|
|
* |
|
342
|
|
|
* @return string|null |
|
343
|
|
|
*/ |
|
344
|
2 |
|
public function getAutoGroupSize() |
|
345
|
|
|
{ |
|
346
|
2 |
|
return $this->autoGroupSize; |
|
347
|
|
|
} |
|
348
|
|
|
|
|
349
|
|
|
/** |
|
350
|
|
|
* Set the autoGroupSize property |
|
351
|
|
|
* |
|
352
|
|
|
* @param string $autoGroupSize |
|
353
|
|
|
* @return $this |
|
354
|
|
|
*/ |
|
355
|
2 |
|
public function setAutoGroupSize($autoGroupSize) |
|
356
|
|
|
{ |
|
357
|
2 |
|
$this->autoGroupSize = $autoGroupSize; |
|
358
|
2 |
|
return $this; |
|
359
|
|
|
} |
|
360
|
|
|
} |
|
361
|
|
|
|