commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetAssetDescriptionChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
20
25{
26
27 public const DISCRIMINATOR_VALUE = 'SetAssetDescriptionChange';
32 protected $type;
33
38 protected $change;
39
44 protected $previousValue;
45
50 protected $nextValue;
51
56 protected $asset;
57
62 protected $catalogData;
63
68 protected $variant;
69
70
74 public function __construct(
75 ?string $change = null,
79 ?string $catalogData = null,
80 ?string $variant = null,
81 ?string $type = null
82 ) {
83 $this->change = $change;
84 $this->previousValue = $previousValue;
85 $this->nextValue = $nextValue;
86 $this->asset = $asset;
87 $this->catalogData = $catalogData;
88 $this->variant = $variant;
89 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
90 }
91
96 public function getType()
97 {
98 if (is_null($this->type)) {
100 $data = $this->raw(self::FIELD_TYPE);
101 if (is_null($data)) {
102 return null;
103 }
104 $this->type = (string) $data;
105 }
106
107 return $this->type;
108 }
109
114 public function getChange()
115 {
116 if (is_null($this->change)) {
118 $data = $this->raw(self::FIELD_CHANGE);
119 if (is_null($data)) {
120 return null;
121 }
122 $this->change = (string) $data;
123 }
124
125 return $this->change;
126 }
127
134 public function getPreviousValue()
135 {
136 if (is_null($this->previousValue)) {
138 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
139 if (is_null($data)) {
140 return null;
141 }
142
143 $this->previousValue = LocalizedStringModel::of($data);
144 }
145
147 }
148
155 public function getNextValue()
156 {
157 if (is_null($this->nextValue)) {
159 $data = $this->raw(self::FIELD_NEXT_VALUE);
160 if (is_null($data)) {
161 return null;
162 }
163
164 $this->nextValue = LocalizedStringModel::of($data);
165 }
166
167 return $this->nextValue;
168 }
169
176 public function getAsset()
177 {
178 if (is_null($this->asset)) {
180 $data = $this->raw(self::FIELD_ASSET);
181 if (is_null($data)) {
182 return null;
183 }
184
185 $this->asset = AssetChangeValueModel::of($data);
186 }
187
188 return $this->asset;
189 }
190
201 public function getCatalogData()
202 {
203 if (is_null($this->catalogData)) {
205 $data = $this->raw(self::FIELD_CATALOG_DATA);
206 if (is_null($data)) {
207 return null;
208 }
209 $this->catalogData = (string) $data;
210 }
211
212 return $this->catalogData;
213 }
214
222 public function getVariant()
223 {
224 if (is_null($this->variant)) {
226 $data = $this->raw(self::FIELD_VARIANT);
227 if (is_null($data)) {
228 return null;
229 }
230 $this->variant = (string) $data;
231 }
232
233 return $this->variant;
234 }
235
236
240 public function setChange(?string $change): void
241 {
242 $this->change = $change;
243 }
244
249 {
250 $this->previousValue = $previousValue;
251 }
252
257 {
258 $this->nextValue = $nextValue;
259 }
260
264 public function setAsset(?AssetChangeValue $asset): void
265 {
266 $this->asset = $asset;
267 }
268
272 public function setCatalogData(?string $catalogData): void
273 {
274 $this->catalogData = $catalogData;
275 }
276
280 public function setVariant(?string $variant): void
281 {
282 $this->variant = $variant;
283 }
284
285
286
287}
__construct(?string $change=null, ?LocalizedString $previousValue=null, ?LocalizedString $nextValue=null, ?AssetChangeValue $asset=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)