commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetImageLabelChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
23final class SetImageLabelChangeBuilder implements Builder
24{
29 private $change;
30
35 private $previousValue;
36
41 private $nextValue;
42
47 private $catalogData;
48
53 private $variant;
54
59 public function getChange()
60 {
61 return $this->change;
62 }
63
70 public function getPreviousValue()
71 {
72 return $this->previousValue instanceof ImageBuilder ? $this->previousValue->build() : $this->previousValue;
73 }
74
81 public function getNextValue()
82 {
83 return $this->nextValue instanceof ImageBuilder ? $this->nextValue->build() : $this->nextValue;
84 }
85
96 public function getCatalogData()
97 {
98 return $this->catalogData;
99 }
100
108 public function getVariant()
109 {
110 return $this->variant;
111 }
112
117 public function withChange(?string $change)
118 {
119 $this->change = $change;
120
121 return $this;
122 }
123
128 public function withPreviousValue(?Image $previousValue)
129 {
130 $this->previousValue = $previousValue;
131
132 return $this;
133 }
134
139 public function withNextValue(?Image $nextValue)
140 {
141 $this->nextValue = $nextValue;
142
143 return $this;
144 }
145
150 public function withCatalogData(?string $catalogData)
151 {
152 $this->catalogData = $catalogData;
153
154 return $this;
155 }
156
161 public function withVariant(?string $variant)
162 {
163 $this->variant = $variant;
164
165 return $this;
166 }
167
172 public function withPreviousValueBuilder(?ImageBuilder $previousValue)
173 {
174 $this->previousValue = $previousValue;
175
176 return $this;
177 }
178
183 public function withNextValueBuilder(?ImageBuilder $nextValue)
184 {
185 $this->nextValue = $nextValue;
186
187 return $this;
188 }
189
190 public function build(): SetImageLabelChange
191 {
192 return new SetImageLabelChangeModel(
193 $this->change,
194 $this->previousValue instanceof ImageBuilder ? $this->previousValue->build() : $this->previousValue,
195 $this->nextValue instanceof ImageBuilder ? $this->nextValue->build() : $this->nextValue,
196 $this->catalogData,
197 $this->variant
198 );
199 }
200
201 public static function of(): SetImageLabelChangeBuilder
202 {
203 return new self();
204 }
205}