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