commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
OperationStatesBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final 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 
71  public function getProcessing()
72  {
73  return $this->processing;
74  }
75 
82  public function getValidationFailed()
83  {
84  return $this->validationFailed;
85  }
86 
93  public function getUnresolved()
94  {
95  return $this->unresolved;
96  }
97 
104  public function getWaitForMasterVariant()
105  {
106  return $this->waitForMasterVariant;
107  }
108 
115  public function getImported()
116  {
117  return $this->imported;
118  }
119 
126  public function getRejected()
127  {
128  return $this->rejected;
129  }
130 
137  public function getCanceled()
138  {
139  return $this->canceled;
140  }
141 
146  public function withProcessing(?int $processing)
147  {
148  $this->processing = $processing;
149 
150  return $this;
151  }
152 
157  public function withValidationFailed(?int $validationFailed)
158  {
159  $this->validationFailed = $validationFailed;
160 
161  return $this;
162  }
163 
168  public function withUnresolved(?int $unresolved)
169  {
170  $this->unresolved = $unresolved;
171 
172  return $this;
173  }
174 
179  public function withWaitForMasterVariant(?int $waitForMasterVariant)
180  {
181  $this->waitForMasterVariant = $waitForMasterVariant;
182 
183  return $this;
184  }
185 
190  public function withImported(?int $imported)
191  {
192  $this->imported = $imported;
193 
194  return $this;
195  }
196 
201  public function withRejected(?int $rejected)
202  {
203  $this->rejected = $rejected;
204 
205  return $this;
206  }
207 
212  public function withCanceled(?int $canceled)
213  {
214  $this->canceled = $canceled;
215 
216  return $this;
217  }
218 
219 
220  public function build(): OperationStates
221  {
222  return new OperationStatesModel(
223  $this->processing,
224  $this->validationFailed,
225  $this->unresolved,
226  $this->waitForMasterVariant,
227  $this->imported,
228  $this->rejected,
229  $this->canceled
230  );
231  }
232 
233  public static function of(): OperationStatesBuilder
234  {
235  return new self();
236  }
237 }