commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetSkuChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
20final class SetSkuChangeModel extends JsonObjectModel implements SetSkuChange
21{
22
23 public const DISCRIMINATOR_VALUE = 'SetSkuChange';
28 protected $type;
29
34 protected $change;
35
40 protected $previousValue;
41
46 protected $nextValue;
47
52 protected $catalogData;
53
58 protected $variant;
59
60
64 public function __construct(
65 ?string $change = null,
66 ?string $previousValue = null,
67 ?string $nextValue = null,
68 ?string $catalogData = null,
69 ?string $variant = null,
70 ?string $type = null
71 ) {
72 $this->change = $change;
73 $this->previousValue = $previousValue;
74 $this->nextValue = $nextValue;
75 $this->catalogData = $catalogData;
76 $this->variant = $variant;
77 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
78 }
79
84 public function getType()
85 {
86 if (is_null($this->type)) {
88 $data = $this->raw(self::FIELD_TYPE);
89 if (is_null($data)) {
90 return null;
91 }
92 $this->type = (string) $data;
93 }
94
95 return $this->type;
96 }
97
102 public function getChange()
103 {
104 if (is_null($this->change)) {
106 $data = $this->raw(self::FIELD_CHANGE);
107 if (is_null($data)) {
108 return null;
109 }
110 $this->change = (string) $data;
111 }
112
113 return $this->change;
114 }
115
122 public function getPreviousValue()
123 {
124 if (is_null($this->previousValue)) {
126 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
127 if (is_null($data)) {
128 return null;
129 }
130 $this->previousValue = (string) $data;
131 }
132
134 }
135
142 public function getNextValue()
143 {
144 if (is_null($this->nextValue)) {
146 $data = $this->raw(self::FIELD_NEXT_VALUE);
147 if (is_null($data)) {
148 return null;
149 }
150 $this->nextValue = (string) $data;
151 }
152
153 return $this->nextValue;
154 }
155
166 public function getCatalogData()
167 {
168 if (is_null($this->catalogData)) {
170 $data = $this->raw(self::FIELD_CATALOG_DATA);
171 if (is_null($data)) {
172 return null;
173 }
174 $this->catalogData = (string) $data;
175 }
176
177 return $this->catalogData;
178 }
179
187 public function getVariant()
188 {
189 if (is_null($this->variant)) {
191 $data = $this->raw(self::FIELD_VARIANT);
192 if (is_null($data)) {
193 return null;
194 }
195 $this->variant = (string) $data;
196 }
197
198 return $this->variant;
199 }
200
201
205 public function setChange(?string $change): void
206 {
207 $this->change = $change;
208 }
209
213 public function setPreviousValue(?string $previousValue): void
214 {
215 $this->previousValue = $previousValue;
216 }
217
221 public function setNextValue(?string $nextValue): void
222 {
223 $this->nextValue = $nextValue;
224 }
225
229 public function setCatalogData(?string $catalogData): void
230 {
231 $this->catalogData = $catalogData;
232 }
233
237 public function setVariant(?string $variant): void
238 {
239 $this->variant = $variant;
240 }
241
242
243
244}
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)