1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file has been auto generated by Jane, |
7
|
|
|
* |
8
|
|
|
* Do no edit it directly. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Montross50\NetsparkerCloud\SDK\Normalizer; |
12
|
|
|
|
13
|
|
|
use Symfony\Component\Serializer\Exception\InvalidArgumentException; |
14
|
|
|
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; |
15
|
|
|
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; |
16
|
|
|
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; |
17
|
|
|
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; |
18
|
|
|
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; |
19
|
|
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; |
20
|
|
|
|
21
|
|
|
class UpdateScheduledIncrementalScanApiModelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface |
22
|
|
|
{ |
23
|
|
|
use DenormalizerAwareTrait; |
24
|
|
|
use NormalizerAwareTrait; |
25
|
|
|
|
26
|
|
|
public function supportsDenormalization($data, $type, $format = null) |
27
|
|
|
{ |
28
|
|
|
return $type === 'Montross50\\NetsparkerCloud\\SDK\\Model\\UpdateScheduledIncrementalScanApiModel'; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
public function supportsNormalization($data, $format = null) |
32
|
|
|
{ |
33
|
|
|
return $data instanceof \Montross50\NetsparkerCloud\SDK\Model\UpdateScheduledIncrementalScanApiModel; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
public function denormalize($data, $class, $format = null, array $context = []) |
37
|
|
|
{ |
38
|
|
|
if (!is_object($data)) { |
39
|
|
|
throw new InvalidArgumentException(); |
40
|
|
|
} |
41
|
|
|
$object = new \Montross50\NetsparkerCloud\SDK\Model\UpdateScheduledIncrementalScanApiModel(); |
42
|
|
|
if (property_exists($data, 'Disabled')) { |
43
|
|
|
$object->setDisabled($data->{'Disabled'}); |
44
|
|
|
} |
45
|
|
|
if (property_exists($data, 'Id')) { |
46
|
|
|
$object->setId($data->{'Id'}); |
47
|
|
|
} |
48
|
|
|
if (property_exists($data, 'IsMaxScanDurationEnabled')) { |
49
|
|
|
$object->setIsMaxScanDurationEnabled($data->{'IsMaxScanDurationEnabled'}); |
50
|
|
|
} |
51
|
|
|
if (property_exists($data, 'MaxScanDuration')) { |
52
|
|
|
$object->setMaxScanDuration($data->{'MaxScanDuration'}); |
53
|
|
|
} |
54
|
|
|
if (property_exists($data, 'Name')) { |
55
|
|
|
$object->setName($data->{'Name'}); |
56
|
|
|
} |
57
|
|
|
if (property_exists($data, 'NextExecutionTime')) { |
58
|
|
|
$object->setNextExecutionTime($data->{'NextExecutionTime'}); |
59
|
|
|
} |
60
|
|
|
if (property_exists($data, 'ScheduleRunType')) { |
61
|
|
|
$object->setScheduleRunType($data->{'ScheduleRunType'}); |
62
|
|
|
} |
63
|
|
|
if (property_exists($data, 'AgentName')) { |
64
|
|
|
$object->setAgentName($data->{'AgentName'}); |
65
|
|
|
} |
66
|
|
|
if (property_exists($data, 'BaseScanId')) { |
67
|
|
|
$object->setBaseScanId($data->{'BaseScanId'}); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
return $object; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
public function normalize($object, $format = null, array $context = []) |
74
|
|
|
{ |
75
|
|
|
$data = new \stdClass(); |
76
|
|
|
if (null !== $object->getDisabled()) { |
77
|
|
|
$data->{'Disabled'} = $object->getDisabled(); |
78
|
|
|
} |
79
|
|
|
if (null !== $object->getId()) { |
80
|
|
|
$data->{'Id'} = $object->getId(); |
81
|
|
|
} |
82
|
|
|
if (null !== $object->getIsMaxScanDurationEnabled()) { |
83
|
|
|
$data->{'IsMaxScanDurationEnabled'} = $object->getIsMaxScanDurationEnabled(); |
84
|
|
|
} |
85
|
|
|
if (null !== $object->getMaxScanDuration()) { |
86
|
|
|
$data->{'MaxScanDuration'} = $object->getMaxScanDuration(); |
87
|
|
|
} |
88
|
|
|
if (null !== $object->getName()) { |
89
|
|
|
$data->{'Name'} = $object->getName(); |
90
|
|
|
} |
91
|
|
|
if (null !== $object->getNextExecutionTime()) { |
92
|
|
|
$data->{'NextExecutionTime'} = $object->getNextExecutionTime(); |
93
|
|
|
} |
94
|
|
|
if (null !== $object->getScheduleRunType()) { |
95
|
|
|
$data->{'ScheduleRunType'} = $object->getScheduleRunType(); |
96
|
|
|
} |
97
|
|
|
if (null !== $object->getAgentName()) { |
98
|
|
|
$data->{'AgentName'} = $object->getAgentName(); |
99
|
|
|
} |
100
|
|
|
if (null !== $object->getBaseScanId()) { |
101
|
|
|
$data->{'BaseScanId'} = $object->getBaseScanId(); |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
return $data; |
105
|
|
|
} |
106
|
|
|
} |
107
|
|
|
|