|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Audiens\AppnexusClient\entity; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Class UploadJobStatus |
|
7
|
|
|
*/ |
|
8
|
|
|
class UploadJobStatus extends UploadTicket |
|
9
|
|
|
{ |
|
10
|
|
|
|
|
11
|
|
|
const PHASE_COMPLETED = 'completed'; |
|
12
|
|
|
|
|
13
|
|
|
use HydratableTrait; |
|
14
|
|
|
|
|
15
|
|
|
protected $phase; |
|
16
|
|
|
protected $start_time; |
|
17
|
|
|
protected $uploaded_time; |
|
18
|
|
|
protected $validated_time; |
|
19
|
|
|
protected $completed_time; |
|
20
|
|
|
protected $error_code; |
|
21
|
|
|
protected $time_to_process; |
|
22
|
|
|
protected $percent_complete; |
|
23
|
|
|
protected $num_valid; |
|
24
|
|
|
protected $num_valid_user; |
|
25
|
|
|
protected $num_invalid_format; |
|
26
|
|
|
protected $num_invalid_user; |
|
27
|
|
|
protected $num_invalid_segment; |
|
28
|
|
|
protected $num_unauth_segment; |
|
29
|
|
|
protected $num_past_expiration; |
|
30
|
|
|
protected $num_inactive_segment; |
|
31
|
|
|
protected $num_other_error; |
|
32
|
|
|
protected $error_log_lines; |
|
33
|
|
|
protected $segment_log_lines; |
|
34
|
|
|
protected $created_on; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @return mixed |
|
38
|
|
|
*/ |
|
39
|
|
|
public function getPhase() |
|
40
|
|
|
{ |
|
41
|
|
|
return $this->phase; |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @param mixed $phase |
|
46
|
|
|
*/ |
|
47
|
|
|
public function setPhase($phase) |
|
48
|
|
|
{ |
|
49
|
|
|
$this->phase = $phase; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* @return mixed |
|
54
|
|
|
*/ |
|
55
|
|
|
public function getStartTime() |
|
56
|
|
|
{ |
|
57
|
|
|
return $this->start_time; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* @param mixed $start_time |
|
62
|
|
|
*/ |
|
63
|
|
|
public function setStartTime($start_time) |
|
64
|
|
|
{ |
|
65
|
|
|
$this->start_time = $start_time; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @return mixed |
|
70
|
|
|
*/ |
|
71
|
|
|
public function getUploadedTime() |
|
72
|
|
|
{ |
|
73
|
|
|
return $this->uploaded_time; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* @param mixed $uploaded_time |
|
78
|
|
|
*/ |
|
79
|
|
|
public function setUploadedTime($uploaded_time) |
|
80
|
|
|
{ |
|
81
|
|
|
$this->uploaded_time = $uploaded_time; |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* @return mixed |
|
86
|
|
|
*/ |
|
87
|
|
|
public function getValidatedTime() |
|
88
|
|
|
{ |
|
89
|
|
|
return $this->validated_time; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* @param mixed $validated_time |
|
94
|
|
|
*/ |
|
95
|
|
|
public function setValidatedTime($validated_time) |
|
96
|
|
|
{ |
|
97
|
|
|
$this->validated_time = $validated_time; |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* @return mixed |
|
102
|
|
|
*/ |
|
103
|
|
|
public function getCompletedTime() |
|
104
|
|
|
{ |
|
105
|
|
|
return $this->completed_time; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* @param mixed $completed_time |
|
110
|
|
|
*/ |
|
111
|
|
|
public function setCompletedTime($completed_time) |
|
112
|
|
|
{ |
|
113
|
|
|
$this->completed_time = $completed_time; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* @return mixed |
|
118
|
|
|
*/ |
|
119
|
|
|
public function getErrorCode() |
|
120
|
|
|
{ |
|
121
|
|
|
return $this->error_code; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* @param mixed $error_code |
|
126
|
|
|
*/ |
|
127
|
|
|
public function setErrorCode($error_code) |
|
128
|
|
|
{ |
|
129
|
|
|
$this->error_code = $error_code; |
|
130
|
|
|
} |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* @return mixed |
|
134
|
|
|
*/ |
|
135
|
|
|
public function getTimeToProcess() |
|
136
|
|
|
{ |
|
137
|
|
|
return $this->time_to_process; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
/** |
|
141
|
|
|
* @param mixed $time_to_process |
|
142
|
|
|
*/ |
|
143
|
|
|
public function setTimeToProcess($time_to_process) |
|
144
|
|
|
{ |
|
145
|
|
|
$this->time_to_process = $time_to_process; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
/** |
|
149
|
|
|
* @return mixed |
|
150
|
|
|
*/ |
|
151
|
|
|
public function getPercentComplete() |
|
152
|
|
|
{ |
|
153
|
|
|
return $this->percent_complete; |
|
154
|
|
|
} |
|
155
|
|
|
|
|
156
|
|
|
/** |
|
157
|
|
|
* @param mixed $percent_complete |
|
158
|
|
|
*/ |
|
159
|
|
|
public function setPercentComplete($percent_complete) |
|
160
|
|
|
{ |
|
161
|
|
|
$this->percent_complete = $percent_complete; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
/** |
|
165
|
|
|
* @return mixed |
|
166
|
|
|
*/ |
|
167
|
|
|
public function getNumValid() |
|
168
|
|
|
{ |
|
169
|
|
|
return $this->num_valid; |
|
170
|
|
|
} |
|
171
|
|
|
|
|
172
|
|
|
/** |
|
173
|
|
|
* @param mixed $num_valid |
|
174
|
|
|
*/ |
|
175
|
|
|
public function setNumValid($num_valid) |
|
176
|
|
|
{ |
|
177
|
|
|
$this->num_valid = $num_valid; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
/** |
|
181
|
|
|
* @return mixed |
|
182
|
|
|
*/ |
|
183
|
|
|
public function getNumValidUser() |
|
184
|
|
|
{ |
|
185
|
|
|
return $this->num_valid_user; |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
/** |
|
189
|
|
|
* @param mixed $num_valid_user |
|
190
|
|
|
*/ |
|
191
|
|
|
public function setNumValidUser($num_valid_user) |
|
192
|
|
|
{ |
|
193
|
|
|
$this->num_valid_user = $num_valid_user; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* @return mixed |
|
198
|
|
|
*/ |
|
199
|
|
|
public function getNumInvalidFormat() |
|
200
|
|
|
{ |
|
201
|
|
|
return $this->num_invalid_format; |
|
202
|
|
|
} |
|
203
|
|
|
|
|
204
|
|
|
/** |
|
205
|
|
|
* @param mixed $num_invalid_format |
|
206
|
|
|
*/ |
|
207
|
|
|
public function setNumInvalidFormat($num_invalid_format) |
|
208
|
|
|
{ |
|
209
|
|
|
$this->num_invalid_format = $num_invalid_format; |
|
210
|
|
|
} |
|
211
|
|
|
|
|
212
|
|
|
/** |
|
213
|
|
|
* @return mixed |
|
214
|
|
|
*/ |
|
215
|
|
|
public function getNumInvalidUser() |
|
216
|
|
|
{ |
|
217
|
|
|
return $this->num_invalid_user; |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
/** |
|
221
|
|
|
* @param mixed $num_invalid_user |
|
222
|
|
|
*/ |
|
223
|
|
|
public function setNumInvalidUser($num_invalid_user) |
|
224
|
|
|
{ |
|
225
|
|
|
$this->num_invalid_user = $num_invalid_user; |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
/** |
|
229
|
|
|
* @return mixed |
|
230
|
|
|
*/ |
|
231
|
|
|
public function getNumInvalidSegment() |
|
232
|
|
|
{ |
|
233
|
|
|
return $this->num_invalid_segment; |
|
234
|
|
|
} |
|
235
|
|
|
|
|
236
|
|
|
/** |
|
237
|
|
|
* @param mixed $num_invalid_segment |
|
238
|
|
|
*/ |
|
239
|
|
|
public function setNumInvalidSegment($num_invalid_segment) |
|
240
|
|
|
{ |
|
241
|
|
|
$this->num_invalid_segment = $num_invalid_segment; |
|
242
|
|
|
} |
|
243
|
|
|
|
|
244
|
|
|
/** |
|
245
|
|
|
* @return mixed |
|
246
|
|
|
*/ |
|
247
|
|
|
public function getNumUnauthSegment() |
|
248
|
|
|
{ |
|
249
|
|
|
return $this->num_unauth_segment; |
|
250
|
|
|
} |
|
251
|
|
|
|
|
252
|
|
|
/** |
|
253
|
|
|
* @param mixed $num_unauth_segment |
|
254
|
|
|
*/ |
|
255
|
|
|
public function setNumUnauthSegment($num_unauth_segment) |
|
256
|
|
|
{ |
|
257
|
|
|
$this->num_unauth_segment = $num_unauth_segment; |
|
258
|
|
|
} |
|
259
|
|
|
|
|
260
|
|
|
/** |
|
261
|
|
|
* @return mixed |
|
262
|
|
|
*/ |
|
263
|
|
|
public function getNumPastExpiration() |
|
264
|
|
|
{ |
|
265
|
|
|
return $this->num_past_expiration; |
|
266
|
|
|
} |
|
267
|
|
|
|
|
268
|
|
|
/** |
|
269
|
|
|
* @param mixed $num_past_expiration |
|
270
|
|
|
*/ |
|
271
|
|
|
public function setNumPastExpiration($num_past_expiration) |
|
272
|
|
|
{ |
|
273
|
|
|
$this->num_past_expiration = $num_past_expiration; |
|
274
|
|
|
} |
|
275
|
|
|
|
|
276
|
|
|
/** |
|
277
|
|
|
* @return mixed |
|
278
|
|
|
*/ |
|
279
|
|
|
public function getNumInactiveSegment() |
|
280
|
|
|
{ |
|
281
|
|
|
return $this->num_inactive_segment; |
|
282
|
|
|
} |
|
283
|
|
|
|
|
284
|
|
|
/** |
|
285
|
|
|
* @param mixed $num_inactive_segment |
|
286
|
|
|
*/ |
|
287
|
|
|
public function setNumInactiveSegment($num_inactive_segment) |
|
288
|
|
|
{ |
|
289
|
|
|
$this->num_inactive_segment = $num_inactive_segment; |
|
290
|
|
|
} |
|
291
|
|
|
|
|
292
|
|
|
/** |
|
293
|
|
|
* @return mixed |
|
294
|
|
|
*/ |
|
295
|
|
|
public function getNumOtherError() |
|
296
|
|
|
{ |
|
297
|
|
|
return $this->num_other_error; |
|
298
|
|
|
} |
|
299
|
|
|
|
|
300
|
|
|
/** |
|
301
|
|
|
* @param mixed $num_other_error |
|
302
|
|
|
*/ |
|
303
|
|
|
public function setNumOtherError($num_other_error) |
|
304
|
|
|
{ |
|
305
|
|
|
$this->num_other_error = $num_other_error; |
|
306
|
|
|
} |
|
307
|
|
|
|
|
308
|
|
|
/** |
|
309
|
|
|
* @return mixed |
|
310
|
|
|
*/ |
|
311
|
|
|
public function getErrorLogLines() |
|
312
|
|
|
{ |
|
313
|
|
|
return $this->error_log_lines; |
|
314
|
|
|
} |
|
315
|
|
|
|
|
316
|
|
|
/** |
|
317
|
|
|
* @param mixed $error_log_lines |
|
318
|
|
|
*/ |
|
319
|
|
|
public function setErrorLogLines($error_log_lines) |
|
320
|
|
|
{ |
|
321
|
|
|
$this->error_log_lines = $error_log_lines; |
|
322
|
|
|
} |
|
323
|
|
|
|
|
324
|
|
|
/** |
|
325
|
|
|
* @return mixed |
|
326
|
|
|
*/ |
|
327
|
|
|
public function getSegmentLogLines() |
|
328
|
|
|
{ |
|
329
|
|
|
return $this->segment_log_lines; |
|
330
|
|
|
} |
|
331
|
|
|
|
|
332
|
|
|
/** |
|
333
|
|
|
* @param mixed $segment_log_lines |
|
334
|
|
|
*/ |
|
335
|
|
|
public function setSegmentLogLines($segment_log_lines) |
|
336
|
|
|
{ |
|
337
|
|
|
$this->segment_log_lines = $segment_log_lines; |
|
338
|
|
|
} |
|
339
|
|
|
|
|
340
|
|
|
/** |
|
341
|
|
|
* @return mixed |
|
342
|
|
|
*/ |
|
343
|
|
|
public function getId() |
|
344
|
|
|
{ |
|
345
|
|
|
return $this->id; |
|
346
|
|
|
} |
|
347
|
|
|
|
|
348
|
|
|
/** |
|
349
|
|
|
* @param mixed $id |
|
350
|
|
|
*/ |
|
351
|
|
|
public function setId($id) |
|
352
|
|
|
{ |
|
353
|
|
|
$this->id = $id; |
|
354
|
|
|
} |
|
355
|
|
|
|
|
356
|
|
|
/** |
|
357
|
|
|
* @return mixed |
|
358
|
|
|
*/ |
|
359
|
|
|
public function getJobId() |
|
360
|
|
|
{ |
|
361
|
|
|
return $this->job_id; |
|
362
|
|
|
} |
|
363
|
|
|
|
|
364
|
|
|
/** |
|
365
|
|
|
* @param mixed $job_id |
|
366
|
|
|
*/ |
|
367
|
|
|
public function setJobId($job_id) |
|
368
|
|
|
{ |
|
369
|
|
|
$this->job_id = $job_id; |
|
370
|
|
|
} |
|
371
|
|
|
|
|
372
|
|
|
/** |
|
373
|
|
|
* @return mixed |
|
374
|
|
|
*/ |
|
375
|
|
|
public function getMemberId() |
|
376
|
|
|
{ |
|
377
|
|
|
return $this->member_id; |
|
378
|
|
|
} |
|
379
|
|
|
|
|
380
|
|
|
/** |
|
381
|
|
|
* @param mixed $member_id |
|
382
|
|
|
*/ |
|
383
|
|
|
public function setMemberId($member_id) |
|
384
|
|
|
{ |
|
385
|
|
|
$this->member_id = $member_id; |
|
386
|
|
|
} |
|
387
|
|
|
|
|
388
|
|
|
/** |
|
389
|
|
|
* @return mixed |
|
390
|
|
|
*/ |
|
391
|
|
|
public function getCreatedOn() |
|
392
|
|
|
{ |
|
393
|
|
|
return $this->created_on; |
|
394
|
|
|
} |
|
395
|
|
|
|
|
396
|
|
|
/** |
|
397
|
|
|
* @param mixed $created_on |
|
398
|
|
|
*/ |
|
399
|
|
|
public function setCreatedOn($created_on) |
|
400
|
|
|
{ |
|
401
|
|
|
$this->created_on = $created_on; |
|
402
|
|
|
} |
|
403
|
|
|
|
|
404
|
|
|
/** |
|
405
|
|
|
* @return mixed |
|
406
|
|
|
*/ |
|
407
|
|
|
public function getLastModified() |
|
408
|
|
|
{ |
|
409
|
|
|
return $this->last_modified; |
|
410
|
|
|
} |
|
411
|
|
|
|
|
412
|
|
|
/** |
|
413
|
|
|
* @param mixed $last_modified |
|
414
|
|
|
*/ |
|
415
|
|
|
public function setLastModified($last_modified) |
|
416
|
|
|
{ |
|
417
|
|
|
$this->last_modified = $last_modified; |
|
418
|
|
|
} |
|
419
|
|
|
|
|
420
|
|
|
/** |
|
421
|
|
|
* @return bool |
|
422
|
|
|
*/ |
|
423
|
|
|
public function isCompeted() |
|
424
|
|
|
{ |
|
425
|
|
|
return $this->phase == self::PHASE_COMPLETED; |
|
426
|
|
|
} |
|
427
|
|
|
|
|
428
|
|
|
/** |
|
429
|
|
|
* @param array $objectArray |
|
430
|
|
|
* |
|
431
|
|
|
* @return UploadJobStatus |
|
432
|
|
|
*/ |
|
433
|
|
|
public static function fromArray(array $objectArray) |
|
434
|
|
|
{ |
|
435
|
|
|
$object = new self(); |
|
436
|
|
|
|
|
437
|
|
|
if (!isset($objectArray['upload_url'])) { |
|
438
|
|
|
$objectArray['upload_url'] = ''; |
|
439
|
|
|
} |
|
440
|
|
|
|
|
441
|
|
|
self::getHydrator()->hydrate($objectArray, $object); |
|
442
|
|
|
|
|
443
|
|
|
return $object; |
|
444
|
|
|
} |
|
445
|
|
|
} |
|
446
|
|
|
|