commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ChangeAssetNameChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
21
26{
31 private $change;
32
37 private $previousValue;
38
43 private $nextValue;
44
49 private $asset;
50
55 private $catalogData;
56
61 private $variant;
62
67 public function getChange()
68 {
69 return $this->change;
70 }
71
78 public function getPreviousValue()
79 {
80 return $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue;
81 }
82
89 public function getNextValue()
90 {
91 return $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue;
92 }
93
100 public function getAsset()
101 {
102 return $this->asset instanceof AssetChangeValueBuilder ? $this->asset->build() : $this->asset;
103 }
104
115 public function getCatalogData()
116 {
117 return $this->catalogData;
118 }
119
127 public function getVariant()
128 {
129 return $this->variant;
130 }
131
136 public function withChange(?string $change)
137 {
138 $this->change = $change;
139
140 return $this;
141 }
142
147 public function withPreviousValue(?LocalizedString $previousValue)
148 {
149 $this->previousValue = $previousValue;
150
151 return $this;
152 }
153
158 public function withNextValue(?LocalizedString $nextValue)
159 {
160 $this->nextValue = $nextValue;
161
162 return $this;
163 }
164
169 public function withAsset(?AssetChangeValue $asset)
170 {
171 $this->asset = $asset;
172
173 return $this;
174 }
175
180 public function withCatalogData(?string $catalogData)
181 {
182 $this->catalogData = $catalogData;
183
184 return $this;
185 }
186
191 public function withVariant(?string $variant)
192 {
193 $this->variant = $variant;
194
195 return $this;
196 }
197
202 public function withPreviousValueBuilder(?LocalizedStringBuilder $previousValue)
203 {
204 $this->previousValue = $previousValue;
205
206 return $this;
207 }
208
213 public function withNextValueBuilder(?LocalizedStringBuilder $nextValue)
214 {
215 $this->nextValue = $nextValue;
216
217 return $this;
218 }
219
225 {
226 $this->asset = $asset;
227
228 return $this;
229 }
230
231 public function build(): ChangeAssetNameChange
232 {
234 $this->change,
235 $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue,
236 $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue,
237 $this->asset instanceof AssetChangeValueBuilder ? $this->asset->build() : $this->asset,
238 $this->catalogData,
239 $this->variant
240 );
241 }
242
243 public static function of(): ChangeAssetNameChangeBuilder
244 {
245 return new self();
246 }
247}