commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetAssetSourcesChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
20
25{
30 private $change;
31
36 private $previousValue;
37
42 private $nextValue;
43
48 private $asset;
49
54 private $catalogData;
55
60 private $variant;
61
66 public function getChange()
67 {
68 return $this->change;
69 }
70
77 public function getPreviousValue()
78 {
79 return $this->previousValue;
80 }
81
88 public function getNextValue()
89 {
90 return $this->nextValue;
91 }
92
99 public function getAsset()
100 {
101 return $this->asset instanceof AssetChangeValueBuilder ? $this->asset->build() : $this->asset;
102 }
103
114 public function getCatalogData()
115 {
116 return $this->catalogData;
117 }
118
126 public function getVariant()
127 {
128 return $this->variant;
129 }
130
135 public function withChange(?string $change)
136 {
137 $this->change = $change;
138
139 return $this;
140 }
141
146 public function withPreviousValue(?AssetSourceCollection $previousValue)
147 {
148 $this->previousValue = $previousValue;
149
150 return $this;
151 }
152
157 public function withNextValue(?AssetSourceCollection $nextValue)
158 {
159 $this->nextValue = $nextValue;
160
161 return $this;
162 }
163
168 public function withAsset(?AssetChangeValue $asset)
169 {
170 $this->asset = $asset;
171
172 return $this;
173 }
174
179 public function withCatalogData(?string $catalogData)
180 {
181 $this->catalogData = $catalogData;
182
183 return $this;
184 }
185
190 public function withVariant(?string $variant)
191 {
192 $this->variant = $variant;
193
194 return $this;
195 }
196
202 {
203 $this->asset = $asset;
204
205 return $this;
206 }
207
208 public function build(): SetAssetSourcesChange
209 {
211 $this->change,
212 $this->previousValue,
213 $this->nextValue,
214 $this->asset instanceof AssetChangeValueBuilder ? $this->asset->build() : $this->asset,
215 $this->catalogData,
216 $this->variant
217 );
218 }
219
220 public static function of(): SetAssetSourcesChangeBuilder
221 {
222 return new self();
223 }
224}