commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OperationStatesBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class OperationStatesBuilder implements Builder
22{
27 private $processing;
28
33 private $validationFailed;
34
39 private $unresolved;
40
45 private $waitForMasterVariant;
46
51 private $imported;
52
57 private $rejected;
58
63 private $canceled;
64
69 private $partiallyImported;
70
77 public function getProcessing()
78 {
79 return $this->processing;
80 }
81
88 public function getValidationFailed()
89 {
90 return $this->validationFailed;
91 }
92
99 public function getUnresolved()
100 {
101 return $this->unresolved;
102 }
103
110 public function getWaitForMasterVariant()
111 {
112 return $this->waitForMasterVariant;
113 }
114
121 public function getImported()
122 {
123 return $this->imported;
124 }
125
132 public function getRejected()
133 {
134 return $this->rejected;
135 }
136
143 public function getCanceled()
144 {
145 return $this->canceled;
146 }
147
154 public function getPartiallyImported()
155 {
156 return $this->partiallyImported;
157 }
158
163 public function withProcessing(?int $processing)
164 {
165 $this->processing = $processing;
166
167 return $this;
168 }
169
174 public function withValidationFailed(?int $validationFailed)
175 {
176 $this->validationFailed = $validationFailed;
177
178 return $this;
179 }
180
185 public function withUnresolved(?int $unresolved)
186 {
187 $this->unresolved = $unresolved;
188
189 return $this;
190 }
191
196 public function withWaitForMasterVariant(?int $waitForMasterVariant)
197 {
198 $this->waitForMasterVariant = $waitForMasterVariant;
199
200 return $this;
201 }
202
207 public function withImported(?int $imported)
208 {
209 $this->imported = $imported;
210
211 return $this;
212 }
213
218 public function withRejected(?int $rejected)
219 {
220 $this->rejected = $rejected;
221
222 return $this;
223 }
224
229 public function withCanceled(?int $canceled)
230 {
231 $this->canceled = $canceled;
232
233 return $this;
234 }
235
240 public function withPartiallyImported(?int $partiallyImported)
241 {
242 $this->partiallyImported = $partiallyImported;
243
244 return $this;
245 }
246
247
248 public function build(): OperationStates
249 {
250 return new OperationStatesModel(
251 $this->processing,
252 $this->validationFailed,
253 $this->unresolved,
254 $this->waitForMasterVariant,
255 $this->imported,
256 $this->rejected,
257 $this->canceled,
258 $this->partiallyImported
259 );
260 }
261
262 public static function of(): OperationStatesBuilder
263 {
264 return new self();
265 }
266}