Completed
Push — master ( a204e7...91d0e4 )
by Anton
15:08 queued 10:37
created

ByTimeData::setQuery()   A

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\Metrica\Stat\Models\Query;
6
use Yandex\Metrica\Stat\Models\Data;
7
use Yandex\Common\Model;
8
9
class ByTimeData extends Model
10
{
11
12
    protected $totalRows = null;
13
14
    protected $sampled = null;
15
16
    protected $sampleShare = null;
17
18
    protected $sampleSize = null;
19
20
    protected $sampleSpace = null;
21
22
    protected $dataLag = null;
23
24
    protected $timeIntervals = null;
25
26
    protected $query = null;
27
28
    protected $data = null;
29
30
    protected $totals = null;
31
32
    protected $mappingClasses = [
33
        'query' => 'Yandex\Metrica\Stat\Models\Query',
34
        'data' => 'Yandex\Metrica\Stat\Models\Data'
35
    ];
36
37
    protected $propNameMap = [
38
        'total_rows' =>'totalRows',
39
        'sample_share' => 'sampleShare',
40
        'sample_size' => 'sampleSize',
41
        'sample_space' => 'sampleSpace',
42
        'data_lag' => 'dataLag',
43
        'time_intervals' => 'timeIntervals'
44
    ];
45
46
    /**
47
     * Retrieve the totalRows property
48
     *
49
     * @return int|null
50
     */
51 4
    public function getTotalRows()
52
    {
53 4
        return $this->totalRows;
54
    }
55
56
    /**
57
     * Set the totalRows property
58
     *
59
     * @param int $totalRows
60
     * @return $this
61
     */
62 3
    public function setTotalRows($totalRows)
63
    {
64 3
        $this->totalRows = $totalRows;
65 3
        return $this;
66
    }
67
68
    /**
69
     * Retrieve the sampled property
70
     *
71
     * @return bool|null
72
     */
73 4
    public function getSampled()
74
    {
75 4
        return $this->sampled;
76
    }
77
78
    /**
79
     * Set the sampled property
80
     *
81
     * @param bool $sampled
82
     * @return $this
83
     */
84 3
    public function setSampled($sampled)
85
    {
86 3
        $this->sampled = $sampled;
87 3
        return $this;
88
    }
89
90
    /**
91
     * Retrieve the sampleShare property
92
     *
93
     * @return bool|null
94
     */
95 4
    public function getSampleShare()
96
    {
97 4
        return $this->sampleShare;
98
    }
99
100
    /**
101
     * Set the sampleShare property
102
     *
103
     * @param bool $sampleShare
104
     * @return $this
105
     */
106 3
    public function setSampleShare($sampleShare)
107
    {
108 3
        $this->sampleShare = $sampleShare;
109 3
        return $this;
110
    }
111
112
    /**
113
     * Retrieve the sampleSize property
114
     *
115
     * @return int|null
116
     */
117 4
    public function getSampleSize()
118
    {
119 4
        return $this->sampleSize;
120
    }
121
122
    /**
123
     * Set the sampleSize property
124
     *
125
     * @param int $sampleSize
126
     * @return $this
127
     */
128 3
    public function setSampleSize($sampleSize)
129
    {
130 3
        $this->sampleSize = $sampleSize;
131 3
        return $this;
132
    }
133
134
    /**
135
     * Retrieve the sampleSpace property
136
     *
137
     * @return int|null
138
     */
139 4
    public function getSampleSpace()
140
    {
141 4
        return $this->sampleSpace;
142
    }
143
144
    /**
145
     * Set the sampleSpace property
146
     *
147
     * @param int $sampleSpace
148
     * @return $this
149
     */
150 3
    public function setSampleSpace($sampleSpace)
151
    {
152 3
        $this->sampleSpace = $sampleSpace;
153 3
        return $this;
154
    }
155
156
    /**
157
     * Retrieve the dataLag property
158
     *
159
     * @return int|null
160
     */
161 4
    public function getDataLag()
162
    {
163 4
        return $this->dataLag;
164
    }
165
166
    /**
167
     * Set the dataLag property
168
     *
169
     * @param int $dataLag
170
     * @return $this
171
     */
172 3
    public function setDataLag($dataLag)
173
    {
174 3
        $this->dataLag = $dataLag;
175 3
        return $this;
176
    }
177
178
    /**
179
     * Retrieve the timeIntervals property
180
     *
181
     * @return array|null
182
     */
183
    public function getTimeIntervals()
184
    {
185
        return $this->timeIntervals;
186
    }
187
188
    /**
189
     * Set the timeIntervals property
190
     *
191
     * @param array $timeIntervals
192
     * @return $this
193
     */
194
    public function setTimeIntervals($timeIntervals)
195
    {
196
        $this->timeIntervals = $timeIntervals;
197
        return $this;
198
    }
199
200
    /**
201
     * Retrieve the query property
202
     *
203
     * @return Query|null
204
     */
205 4
    public function getQuery()
206
    {
207 4
        return $this->query;
208
    }
209
210
    /**
211
     * Set the query property
212
     *
213
     * @param Query $query
214
     * @return $this
215
     */
216 3
    public function setQuery($query)
217
    {
218 3
        $this->query = $query;
219 3
        return $this;
220
    }
221
222
    /**
223
     * Retrieve the data property
224
     *
225
     * @return Data|null
226
     */
227 4
    public function getData()
228
    {
229 4
        return $this->data;
230
    }
231
232
    /**
233
     * Set the data property
234
     *
235
     * @param Data $data
236
     * @return $this
237
     */
238 3
    public function setData($data)
239
    {
240 3
        $this->data = $data;
241 3
        return $this;
242
    }
243
244
    /**
245
     * Retrieve the totals property
246
     *
247
     * @return array|null
248
     */
249 4
    public function getTotals()
250
    {
251 4
        return $this->totals;
252
    }
253
254
    /**
255
     * Set the totals property
256
     *
257
     * @param array $totals
258
     * @return $this
259
     */
260 3
    public function setTotals($totals)
261
    {
262 3
        $this->totals = $totals;
263 3
        return $this;
264
    }
265
}
266