ByTimeParams::setIncludeUndefined()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Yandex\Metrica\Stat\Models;
4
5
use Yandex\Common\Model;
6
use Yandex\Common\StringCollection;
7
8
class ByTimeParams 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 $group = null;
51
52
    protected $rowIds = null;
53
54
    protected $topKeys = null;
55
56
    protected $mappingClasses = [];
57
58
    protected $propNameMap = [
59
        'include_undefined' => 'includeUndefined',
60
        'row_ids' => 'rowIds',
61
        'top_keys' => 'topKeys'
62
    ];
63
64
    /**
65
     * Retrieve the id property
66
     *
67
     * @return int|null
68
     */
69 1
    public function getId()
70
    {
71 1
        return $this->id;
72
    }
73
74
    /**
75
     * Set the id property
76
     *
77
     * @param int $id
78
     * @return $this
79
     */
80 2
    public function setId($id)
81
    {
82 2
        $this->id = $id;
83 2
        return $this;
84
    }
85
86
    /**
87
     * Retrieve the preset property
88
     *
89
     * @return string|null
90
     */
91 1
    public function getPreset()
92
    {
93 1
        return $this->preset;
94
    }
95
96
    /**
97
     * Set the preset property
98
     *
99
     * @param string $preset
100
     * @return $this
101
     */
102 1
    public function setPreset($preset)
103
    {
104 1
        $this->preset = $preset;
105 1
        return $this;
106
    }
107
108
    /**
109
     * Retrieve the dimensions property
110
     *
111
     * @return string[]|null
112
     */
113 1
    public function getDimensions()
114
    {
115 1
        return is_null($this->dimensions) ? null : $this->dimensions->asArray();
116
    }
117
118
    /**
119
     * Set the dimensions property
120
     *
121
     * @param string[]|string|null $dimensions
122
     * @return $this
123
     */
124 3
    public function setDimensions($dimensions)
125
    {
126 3
        $this->dimensions = StringCollection::init($dimensions);
127 3
        return $this;
128
    }
129
130
    /**
131
     * Retrieve the metrics property
132
     *
133
     * @return string[]|null
134
     */
135 1
    public function getMetrics()
136
    {
137 1
        return is_null($this->metrics) ? null : $this->metrics->asArray();
138
    }
139
140
    /**
141
     * Set the metrics property
142
     *
143
     * @param string[]|string|null $metrics
144
     * @return $this
145
     */
146 2
    public function setMetrics($metrics)
147
    {
148 2
        $this->metrics = StringCollection::init($metrics);
149 2
        return $this;
150
    }
151
152
    /**
153
     * Retrieve the sort property
154
     *
155
     * @return string[]|null
156
     */
157 1
    public function getSort()
158
    {
159 1
        return is_null($this->sort) ? null : $this->sort->asArray();
160
    }
161
162
    /**
163
     * Set the sort property
164
     *
165
     * @param string[]|string|null $sort
166
     * @return $this
167
     */
168 2
    public function setSort($sort)
169
    {
170 2
        $this->sort = StringCollection::init($sort);
171 2
        return $this;
172
    }
173
174
    /**
175
     * Retrieve the limit property
176
     *
177
     * @return int|null
178
     */
179 1
    public function getLimit()
180
    {
181 1
        return $this->limit;
182
    }
183
184
    /**
185
     * Set the limit property
186
     *
187
     * @param int $limit
188
     * @return $this
189
     */
190 3
    public function setLimit($limit)
191
    {
192 3
        $this->limit = $limit;
193 3
        return $this;
194
    }
195
196
    /**
197
     * Retrieve the offset property
198
     *
199
     * @return int|null
200
     */
201 1
    public function getOffset()
202
    {
203 1
        return $this->offset;
204
    }
205
206
    /**
207
     * Set the offset property
208
     *
209
     * @param int $offset
210
     * @return $this
211
     */
212 1
    public function setOffset($offset)
213
    {
214 1
        $this->offset = $offset;
215 1
        return $this;
216
    }
217
218
    /**
219
     * Retrieve the date1 property
220
     *
221
     * @return string|null
222
     */
223 1
    public function getDate1()
224
    {
225 1
        return $this->date1;
226
    }
227
228
    /**
229
     * Set the date1 property
230
     *
231
     * @param string $date1
232
     * @return $this
233
     */
234 1
    public function setDate1($date1)
235
    {
236 1
        $this->date1 = $date1;
237 1
        return $this;
238
    }
239
240
    /**
241
     * Retrieve the date2 property
242
     *
243
     * @return string|null
244
     */
245 1
    public function getDate2()
246
    {
247 1
        return $this->date2;
248
    }
249
250
    /**
251
     * Set the date2 property
252
     *
253
     * @param string $date2
254
     * @return $this
255
     */
256 1
    public function setDate2($date2)
257
    {
258 1
        $this->date2 = $date2;
259 1
        return $this;
260
    }
261
262
    /**
263
     * Retrieve the filters property
264
     *
265
     * @return string|null
266
     */
267 1
    public function getFilters()
268
    {
269 1
        return $this->filters;
270
    }
271
272
    /**
273
     * Set the filters property
274
     *
275
     * @param string $filters
276
     * @return $this
277
     */
278 2
    public function setFilters($filters)
279
    {
280 2
        $this->filters = $filters;
281 2
        return $this;
282
    }
283
284
    /**
285
     * Retrieve the accuracy property
286
     *
287
     * @return string|null
288
     */
289 1
    public function getAccuracy()
290
    {
291 1
        return $this->accuracy;
292
    }
293
294
    /**
295
     * Set the accuracy property
296
     *
297
     * @param string $accuracy
298
     * @return $this
299
     */
300 1
    public function setAccuracy($accuracy)
301
    {
302 1
        $this->accuracy = $accuracy;
303 1
        return $this;
304
    }
305
306
    /**
307
     * Retrieve the callback property
308
     *
309
     * @return string|null
310
     */
311 1
    public function getCallback()
312
    {
313 1
        return $this->callback;
314
    }
315
316
    /**
317
     * Set the callback property
318
     *
319
     * @param string $callback
320
     * @return $this
321
     */
322 1
    public function setCallback($callback)
323
    {
324 1
        $this->callback = $callback;
325 1
        return $this;
326
    }
327
328
    /**
329
     * Retrieve the includeUndefined property
330
     *
331
     * @return bool|null
332
     */
333 1
    public function getIncludeUndefined()
334
    {
335 1
        return $this->includeUndefined;
336
    }
337
338
    /**
339
     * Set the includeUndefined property
340
     *
341
     * @param bool $includeUndefined
342
     * @return $this
343
     */
344 1
    public function setIncludeUndefined($includeUndefined)
345
    {
346 1
        $this->includeUndefined = $includeUndefined;
347 1
        return $this;
348
    }
349
350
    /**
351
     * Retrieve the lang property
352
     *
353
     * @return string|null
354
     */
355 1
    public function getLang()
356
    {
357 1
        return $this->lang;
358
    }
359
360
    /**
361
     * Set the lang property
362
     *
363
     * @param string $lang
364
     * @return $this
365
     */
366 1
    public function setLang($lang)
367
    {
368 1
        $this->lang = $lang;
369 1
        return $this;
370
    }
371
372
    /**
373
     * Retrieve the pretty property
374
     *
375
     * @return bool|null
376
     */
377 1
    public function getPretty()
378
    {
379 1
        return $this->pretty;
380
    }
381
382
    /**
383
     * Set the pretty property
384
     *
385
     * @param bool $pretty
386
     * @return $this
387
     */
388 1
    public function setPretty($pretty)
389
    {
390 1
        $this->pretty = $pretty;
391 1
        return $this;
392
    }
393
394
    /**
395
     * Retrieve the group property
396
     *
397
     * @return string|null
398
     */
399 1
    public function getGroup()
400
    {
401 1
        return $this->group;
402
    }
403
404
    /**
405
     * Set the group property
406
     *
407
     * @param string $group
408
     * @return $this
409
     */
410 1
    public function setGroup($group)
411
    {
412 1
        $this->group = $group;
413 1
        return $this;
414
    }
415
416
    /**
417
     * Retrieve the rowIds property
418
     *
419
     * @return string|null
420
     */
421 1
    public function getRowIds()
422
    {
423 1
        return $this->rowIds;
424
    }
425
426
    /**
427
     * Set the rowIds property
428
     *
429
     * @param string $rowIds
430
     * @return $this
431
     */
432 1
    public function setRowIds($rowIds)
433
    {
434 1
        $this->rowIds = $rowIds;
435 1
        return $this;
436
    }
437
438
    /**
439
     * Retrieve the topKeys property
440
     *
441
     * @return int|null
442
     */
443 1
    public function getTopKeys()
444
    {
445 1
        return $this->topKeys;
446
    }
447
448
    /**
449
     * Set the topKeys property
450
     *
451
     * @param int $topKeys
452
     * @return $this
453
     */
454 1
    public function setTopKeys($topKeys)
455
    {
456 1
        $this->topKeys = $topKeys;
457 1
        return $this;
458
    }
459
}
460