commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ChangeEnumValueLabelChangeModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use 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 
60 
64  public function __construct(
65  ?string $change = null,
66  ?string $previousValue = null,
67  ?string $nextValue = null,
68  ?string $fieldName = null,
69  ?string $valueKey = null,
70  ?string $type = null
71  ) {
72  $this->change = $change;
73  $this->previousValue = $previousValue;
74  $this->nextValue = $nextValue;
75  $this->fieldName = $fieldName;
76  $this->valueKey = $valueKey;
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 
133  return $this->previousValue;
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 
162  public function getFieldName()
163  {
164  if (is_null($this->fieldName)) {
166  $data = $this->raw(self::FIELD_FIELD_NAME);
167  if (is_null($data)) {
168  return null;
169  }
170  $this->fieldName = (string) $data;
171  }
172 
173  return $this->fieldName;
174  }
175 
182  public function getValueKey()
183  {
184  if (is_null($this->valueKey)) {
186  $data = $this->raw(self::FIELD_VALUE_KEY);
187  if (is_null($data)) {
188  return null;
189  }
190  $this->valueKey = (string) $data;
191  }
192 
193  return $this->valueKey;
194  }
195 
196 
200  public function setChange(?string $change): void
201  {
202  $this->change = $change;
203  }
204 
208  public function setPreviousValue(?string $previousValue): void
209  {
210  $this->previousValue = $previousValue;
211  }
212 
216  public function setNextValue(?string $nextValue): void
217  {
218  $this->nextValue = $nextValue;
219  }
220 
224  public function setFieldName(?string $fieldName): void
225  {
226  $this->fieldName = $fieldName;
227  }
228 
232  public function setValueKey(?string $valueKey): void
233  {
234  $this->valueKey = $valueKey;
235  }
236 
237 
238 
239 }
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $fieldName=null, ?string $valueKey=null, ?string $type=null)