1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
namespace SpotifyApiConnect\Domain\DataTransferObject; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Auto generated data provider |
7
|
|
|
*/ |
8
|
|
|
final class PlaylistTracksDataProvider extends \Xervice\DataProvider\Business\Model\DataProvider\AbstractDataProvider implements \Xervice\DataProvider\Business\Model\DataProvider\DataProviderInterface |
9
|
|
|
{ |
10
|
|
|
/** @var \SpotifyApiConnect\Domain\DataTransferObject\ItemDataProvider[] */ |
11
|
|
|
protected $items = []; |
12
|
|
|
|
13
|
|
|
/** @var int */ |
14
|
|
|
protected $limit; |
15
|
|
|
|
16
|
|
|
/** @var int */ |
17
|
|
|
protected $next; |
18
|
|
|
|
19
|
|
|
/** @var int */ |
20
|
|
|
protected $offset; |
21
|
|
|
|
22
|
|
|
/** @var int */ |
23
|
|
|
protected $previous; |
24
|
|
|
|
25
|
|
|
/** @var int */ |
26
|
|
|
protected $total; |
27
|
|
|
|
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @return \SpotifyApiConnect\Domain\DataTransferObject\ItemDataProvider[] |
31
|
|
|
*/ |
32
|
|
|
public function getItems(): ?array |
33
|
|
|
{ |
34
|
|
|
return $this->items; |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @param \SpotifyApiConnect\Domain\DataTransferObject\ItemDataProvider[] $items |
40
|
|
|
* @return PlaylistTracksDataProvider |
41
|
|
|
*/ |
42
|
|
|
public function setItems(?array $items = null) |
43
|
|
|
{ |
44
|
|
|
$this->items = $items; |
45
|
|
|
|
46
|
|
|
return $this; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return PlaylistTracksDataProvider |
52
|
|
|
*/ |
53
|
|
|
public function unsetItems() |
54
|
|
|
{ |
55
|
|
|
$this->items = null; |
56
|
|
|
|
57
|
|
|
return $this; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return bool |
63
|
|
|
*/ |
64
|
|
|
public function hasItems() |
65
|
|
|
{ |
66
|
|
|
return ($this->items !== null && $this->items !== []); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @param \SpotifyApiConnect\Domain\DataTransferObject\ItemDataProvider $item |
72
|
|
|
* @return PlaylistTracksDataProvider |
73
|
|
|
*/ |
74
|
|
|
public function additem(ItemDataProvider $item) |
75
|
|
|
{ |
76
|
|
|
$this->items[] = $item; return $this; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return int |
82
|
|
|
*/ |
83
|
|
|
public function getLimit(): ?int |
84
|
|
|
{ |
85
|
|
|
return $this->limit; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @param int $limit |
91
|
|
|
* @return PlaylistTracksDataProvider |
92
|
|
|
*/ |
93
|
|
|
public function setLimit(?int $limit = null) |
94
|
|
|
{ |
95
|
|
|
$this->limit = $limit; |
96
|
|
|
|
97
|
|
|
return $this; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return PlaylistTracksDataProvider |
103
|
|
|
*/ |
104
|
|
|
public function unsetLimit() |
105
|
|
|
{ |
106
|
|
|
$this->limit = null; |
107
|
|
|
|
108
|
|
|
return $this; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @return bool |
114
|
|
|
*/ |
115
|
|
|
public function hasLimit() |
116
|
|
|
{ |
117
|
|
|
return ($this->limit !== null && $this->limit !== []); |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @return int |
123
|
|
|
*/ |
124
|
|
|
public function getNext(): ?int |
125
|
|
|
{ |
126
|
|
|
return $this->next; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @param int $next |
132
|
|
|
* @return PlaylistTracksDataProvider |
133
|
|
|
*/ |
134
|
|
|
public function setNext(?int $next = null) |
135
|
|
|
{ |
136
|
|
|
$this->next = $next; |
137
|
|
|
|
138
|
|
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @return PlaylistTracksDataProvider |
144
|
|
|
*/ |
145
|
|
|
public function unsetNext() |
146
|
|
|
{ |
147
|
|
|
$this->next = null; |
148
|
|
|
|
149
|
|
|
return $this; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @return bool |
155
|
|
|
*/ |
156
|
|
|
public function hasNext() |
157
|
|
|
{ |
158
|
|
|
return ($this->next !== null && $this->next !== []); |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* @return int |
164
|
|
|
*/ |
165
|
|
|
public function getOffset(): ?int |
166
|
|
|
{ |
167
|
|
|
return $this->offset; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @param int $offset |
173
|
|
|
* @return PlaylistTracksDataProvider |
174
|
|
|
*/ |
175
|
|
|
public function setOffset(?int $offset = null) |
176
|
|
|
{ |
177
|
|
|
$this->offset = $offset; |
178
|
|
|
|
179
|
|
|
return $this; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* @return PlaylistTracksDataProvider |
185
|
|
|
*/ |
186
|
|
|
public function unsetOffset() |
187
|
|
|
{ |
188
|
|
|
$this->offset = null; |
189
|
|
|
|
190
|
|
|
return $this; |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @return bool |
196
|
|
|
*/ |
197
|
|
|
public function hasOffset() |
198
|
|
|
{ |
199
|
|
|
return ($this->offset !== null && $this->offset !== []); |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @return int |
205
|
|
|
*/ |
206
|
|
|
public function getPrevious(): ?int |
207
|
|
|
{ |
208
|
|
|
return $this->previous; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* @param int $previous |
214
|
|
|
* @return PlaylistTracksDataProvider |
215
|
|
|
*/ |
216
|
|
|
public function setPrevious(?int $previous = null) |
217
|
|
|
{ |
218
|
|
|
$this->previous = $previous; |
219
|
|
|
|
220
|
|
|
return $this; |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
|
224
|
|
|
/** |
225
|
|
|
* @return PlaylistTracksDataProvider |
226
|
|
|
*/ |
227
|
|
|
public function unsetPrevious() |
228
|
|
|
{ |
229
|
|
|
$this->previous = null; |
230
|
|
|
|
231
|
|
|
return $this; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
|
235
|
|
|
/** |
236
|
|
|
* @return bool |
237
|
|
|
*/ |
238
|
|
|
public function hasPrevious() |
239
|
|
|
{ |
240
|
|
|
return ($this->previous !== null && $this->previous !== []); |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* @return int |
246
|
|
|
*/ |
247
|
|
|
public function getTotal(): ?int |
248
|
|
|
{ |
249
|
|
|
return $this->total; |
250
|
|
|
} |
251
|
|
|
|
252
|
|
|
|
253
|
|
|
/** |
254
|
|
|
* @param int $total |
255
|
|
|
* @return PlaylistTracksDataProvider |
256
|
|
|
*/ |
257
|
|
|
public function setTotal(?int $total = null) |
258
|
|
|
{ |
259
|
|
|
$this->total = $total; |
260
|
|
|
|
261
|
|
|
return $this; |
262
|
|
|
} |
263
|
|
|
|
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* @return PlaylistTracksDataProvider |
267
|
|
|
*/ |
268
|
|
|
public function unsetTotal() |
269
|
|
|
{ |
270
|
|
|
$this->total = null; |
271
|
|
|
|
272
|
|
|
return $this; |
273
|
|
|
} |
274
|
|
|
|
275
|
|
|
|
276
|
|
|
/** |
277
|
|
|
* @return bool |
278
|
|
|
*/ |
279
|
|
|
public function hasTotal() |
280
|
|
|
{ |
281
|
|
|
return ($this->total !== null && $this->total !== []); |
282
|
|
|
} |
283
|
|
|
|
284
|
|
|
|
285
|
|
|
/** |
286
|
|
|
* @return array |
287
|
|
|
*/ |
288
|
|
|
protected function getElements(): array |
289
|
|
|
{ |
290
|
|
|
return array ( |
291
|
|
|
'items' => |
292
|
|
|
array ( |
293
|
|
|
'name' => 'items', |
294
|
|
|
'allownull' => true, |
295
|
|
|
'default' => '', |
296
|
|
|
'type' => '\\SpotifyApiConnect\\Domain\\DataTransferObject\\ItemDataProvider[]', |
297
|
|
|
'is_collection' => true, |
298
|
|
|
'is_dataprovider' => false, |
299
|
|
|
'isCamelCase' => false, |
300
|
|
|
'singleton' => 'item', |
301
|
|
|
'singleton_type' => '\\SpotifyApiConnect\\Domain\\DataTransferObject\\ItemDataProvider', |
302
|
|
|
), |
303
|
|
|
'limit' => |
304
|
|
|
array ( |
305
|
|
|
'name' => 'limit', |
306
|
|
|
'allownull' => true, |
307
|
|
|
'default' => '', |
308
|
|
|
'type' => 'int', |
309
|
|
|
'is_collection' => false, |
310
|
|
|
'is_dataprovider' => false, |
311
|
|
|
'isCamelCase' => false, |
312
|
|
|
), |
313
|
|
|
'next' => |
314
|
|
|
array ( |
315
|
|
|
'name' => 'next', |
316
|
|
|
'allownull' => true, |
317
|
|
|
'default' => '', |
318
|
|
|
'type' => 'int', |
319
|
|
|
'is_collection' => false, |
320
|
|
|
'is_dataprovider' => false, |
321
|
|
|
'isCamelCase' => false, |
322
|
|
|
), |
323
|
|
|
'offset' => |
324
|
|
|
array ( |
325
|
|
|
'name' => 'offset', |
326
|
|
|
'allownull' => true, |
327
|
|
|
'default' => '', |
328
|
|
|
'type' => 'int', |
329
|
|
|
'is_collection' => false, |
330
|
|
|
'is_dataprovider' => false, |
331
|
|
|
'isCamelCase' => false, |
332
|
|
|
), |
333
|
|
|
'previous' => |
334
|
|
|
array ( |
335
|
|
|
'name' => 'previous', |
336
|
|
|
'allownull' => true, |
337
|
|
|
'default' => '', |
338
|
|
|
'type' => 'int', |
339
|
|
|
'is_collection' => false, |
340
|
|
|
'is_dataprovider' => false, |
341
|
|
|
'isCamelCase' => false, |
342
|
|
|
), |
343
|
|
|
'total' => |
344
|
|
|
array ( |
345
|
|
|
'name' => 'total', |
346
|
|
|
'allownull' => true, |
347
|
|
|
'default' => '', |
348
|
|
|
'type' => 'int', |
349
|
|
|
'is_collection' => false, |
350
|
|
|
'is_dataprovider' => false, |
351
|
|
|
'isCamelCase' => false, |
352
|
|
|
), |
353
|
|
|
); |
354
|
|
|
} |
355
|
|
|
} |
356
|
|
|
|