commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ChangeAssetOrderChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
17
22{
23
24 public const DISCRIMINATOR_VALUE = 'ChangeAssetOrderChange';
29 protected $type;
30
35 protected $change;
36
41 protected $previousValue;
42
47 protected $nextValue;
48
53 protected $catalogData;
54
59 protected $variant;
60
61
65 public function __construct(
66 ?string $change = null,
69 ?string $catalogData = null,
70 ?string $variant = null,
71 ?string $type = null
72 ) {
73 $this->change = $change;
74 $this->previousValue = $previousValue;
75 $this->nextValue = $nextValue;
76 $this->catalogData = $catalogData;
77 $this->variant = $variant;
78 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
79 }
80
85 public function getType()
86 {
87 if (is_null($this->type)) {
89 $data = $this->raw(self::FIELD_TYPE);
90 if (is_null($data)) {
91 return null;
92 }
93 $this->type = (string) $data;
94 }
95
96 return $this->type;
97 }
98
103 public function getChange()
104 {
105 if (is_null($this->change)) {
107 $data = $this->raw(self::FIELD_CHANGE);
108 if (is_null($data)) {
109 return null;
110 }
111 $this->change = (string) $data;
112 }
113
114 return $this->change;
115 }
116
123 public function getPreviousValue()
124 {
125 if (is_null($this->previousValue)) {
127 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
128 if (is_null($data)) {
129 return null;
130 }
131 $this->previousValue = LocalizedStringCollection::fromArray($data);
132 }
133
135 }
136
143 public function getNextValue()
144 {
145 if (is_null($this->nextValue)) {
147 $data = $this->raw(self::FIELD_NEXT_VALUE);
148 if (is_null($data)) {
149 return null;
150 }
151 $this->nextValue = LocalizedStringCollection::fromArray($data);
152 }
153
154 return $this->nextValue;
155 }
156
167 public function getCatalogData()
168 {
169 if (is_null($this->catalogData)) {
171 $data = $this->raw(self::FIELD_CATALOG_DATA);
172 if (is_null($data)) {
173 return null;
174 }
175 $this->catalogData = (string) $data;
176 }
177
178 return $this->catalogData;
179 }
180
188 public function getVariant()
189 {
190 if (is_null($this->variant)) {
192 $data = $this->raw(self::FIELD_VARIANT);
193 if (is_null($data)) {
194 return null;
195 }
196 $this->variant = (string) $data;
197 }
198
199 return $this->variant;
200 }
201
202
206 public function setChange(?string $change): void
207 {
208 $this->change = $change;
209 }
210
215 {
216 $this->previousValue = $previousValue;
217 }
218
223 {
224 $this->nextValue = $nextValue;
225 }
226
230 public function setCatalogData(?string $catalogData): void
231 {
232 $this->catalogData = $catalogData;
233 }
234
238 public function setVariant(?string $variant): void
239 {
240 $this->variant = $variant;
241 }
242
243
244
245}
__construct(?string $change=null, ?LocalizedStringCollection $previousValue=null, ?LocalizedStringCollection $nextValue=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)