commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RemoveAssetChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
18
23{
24
25 public const DISCRIMINATOR_VALUE = 'RemoveAssetChange';
30 protected $type;
31
36 protected $change;
37
42 protected $previousValue;
43
48 protected $catalogData;
49
54 protected $variant;
55
56
60 public function __construct(
61 ?string $change = null,
62 ?Asset $previousValue = null,
63 ?string $catalogData = null,
64 ?string $variant = null,
65 ?string $type = null
66 ) {
67 $this->change = $change;
68 $this->previousValue = $previousValue;
69 $this->catalogData = $catalogData;
70 $this->variant = $variant;
71 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
72 }
73
78 public function getType()
79 {
80 if (is_null($this->type)) {
82 $data = $this->raw(self::FIELD_TYPE);
83 if (is_null($data)) {
84 return null;
85 }
86 $this->type = (string) $data;
87 }
88
89 return $this->type;
90 }
91
96 public function getChange()
97 {
98 if (is_null($this->change)) {
100 $data = $this->raw(self::FIELD_CHANGE);
101 if (is_null($data)) {
102 return null;
103 }
104 $this->change = (string) $data;
105 }
106
107 return $this->change;
108 }
109
116 public function getPreviousValue()
117 {
118 if (is_null($this->previousValue)) {
120 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
121 if (is_null($data)) {
122 return null;
123 }
124
125 $this->previousValue = AssetModel::of($data);
126 }
127
129 }
130
141 public function getCatalogData()
142 {
143 if (is_null($this->catalogData)) {
145 $data = $this->raw(self::FIELD_CATALOG_DATA);
146 if (is_null($data)) {
147 return null;
148 }
149 $this->catalogData = (string) $data;
150 }
151
152 return $this->catalogData;
153 }
154
162 public function getVariant()
163 {
164 if (is_null($this->variant)) {
166 $data = $this->raw(self::FIELD_VARIANT);
167 if (is_null($data)) {
168 return null;
169 }
170 $this->variant = (string) $data;
171 }
172
173 return $this->variant;
174 }
175
176
180 public function setChange(?string $change): void
181 {
182 $this->change = $change;
183 }
184
188 public function setPreviousValue(?Asset $previousValue): void
189 {
190 $this->previousValue = $previousValue;
191 }
192
196 public function setCatalogData(?string $catalogData): void
197 {
198 $this->catalogData = $catalogData;
199 }
200
204 public function setVariant(?string $variant): void
205 {
206 $this->variant = $variant;
207 }
208
209
210
211}
__construct(?string $change=null, ?Asset $previousValue=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)