commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ChangeEnumValueLabelChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22
23 public const DISCRIMINATOR_VALUE = 'ChangeEnumValueLabelChange';
28 protected $type;
29
34 protected $change;
35
40 protected $previousValue;
41
46 protected $nextValue;
47
52 protected $fieldName;
53
58 protected $valueKey;
59
64 protected $attributeName;
65
66
70 public function __construct(
71 ?string $change = null,
72 ?string $previousValue = null,
73 ?string $nextValue = null,
74 ?string $fieldName = null,
75 ?string $valueKey = null,
76 ?string $attributeName = null,
77 ?string $type = null
78 ) {
79 $this->change = $change;
80 $this->previousValue = $previousValue;
81 $this->nextValue = $nextValue;
82 $this->fieldName = $fieldName;
83 $this->valueKey = $valueKey;
84 $this->attributeName = $attributeName;
85 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
86 }
87
92 public function getType()
93 {
94 if (is_null($this->type)) {
96 $data = $this->raw(self::FIELD_TYPE);
97 if (is_null($data)) {
98 return null;
99 }
100 $this->type = (string) $data;
101 }
102
103 return $this->type;
104 }
105
110 public function getChange()
111 {
112 if (is_null($this->change)) {
114 $data = $this->raw(self::FIELD_CHANGE);
115 if (is_null($data)) {
116 return null;
117 }
118 $this->change = (string) $data;
119 }
120
121 return $this->change;
122 }
123
130 public function getPreviousValue()
131 {
132 if (is_null($this->previousValue)) {
134 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
135 if (is_null($data)) {
136 return null;
137 }
138 $this->previousValue = (string) $data;
139 }
140
142 }
143
150 public function getNextValue()
151 {
152 if (is_null($this->nextValue)) {
154 $data = $this->raw(self::FIELD_NEXT_VALUE);
155 if (is_null($data)) {
156 return null;
157 }
158 $this->nextValue = (string) $data;
159 }
160
161 return $this->nextValue;
162 }
163
170 public function getFieldName()
171 {
172 if (is_null($this->fieldName)) {
174 $data = $this->raw(self::FIELD_FIELD_NAME);
175 if (is_null($data)) {
176 return null;
177 }
178 $this->fieldName = (string) $data;
179 }
180
181 return $this->fieldName;
182 }
183
190 public function getValueKey()
191 {
192 if (is_null($this->valueKey)) {
194 $data = $this->raw(self::FIELD_VALUE_KEY);
195 if (is_null($data)) {
196 return null;
197 }
198 $this->valueKey = (string) $data;
199 }
200
201 return $this->valueKey;
202 }
203
210 public function getAttributeName()
211 {
212 if (is_null($this->attributeName)) {
214 $data = $this->raw(self::FIELD_ATTRIBUTE_NAME);
215 if (is_null($data)) {
216 return null;
217 }
218 $this->attributeName = (string) $data;
219 }
220
222 }
223
224
228 public function setChange(?string $change): void
229 {
230 $this->change = $change;
231 }
232
236 public function setPreviousValue(?string $previousValue): void
237 {
238 $this->previousValue = $previousValue;
239 }
240
244 public function setNextValue(?string $nextValue): void
245 {
246 $this->nextValue = $nextValue;
247 }
248
252 public function setFieldName(?string $fieldName): void
253 {
254 $this->fieldName = $fieldName;
255 }
256
260 public function setValueKey(?string $valueKey): void
261 {
262 $this->valueKey = $valueKey;
263 }
264
268 public function setAttributeName(?string $attributeName): void
269 {
270 $this->attributeName = $attributeName;
271 }
272
273
274
275}
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $fieldName=null, ?string $valueKey=null, ?string $attributeName=null, ?string $type=null)