commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ReviewStateTransitionMessageBuilder.php
1<?php
2
3declare(strict_types=1);
10
24use DateTimeImmutable;
25use stdClass;
26
31{
36 private $id;
37
42 private $version;
43
48 private $createdAt;
49
54 private $lastModifiedAt;
55
60 private $lastModifiedBy;
61
66 private $createdBy;
67
72 private $sequenceNumber;
73
78 private $resource;
79
84 private $resourceVersion;
85
90 private $resourceUserProvidedIdentifiers;
91
96 private $oldState;
97
102 private $newState;
103
108 private $oldIncludedInStatistics;
109
114 private $newIncludedInStatistics;
115
120 private $target;
121
126 private $force;
127
134 public function getId()
135 {
136 return $this->id;
137 }
138
145 public function getVersion()
146 {
147 return $this->version;
148 }
149
156 public function getCreatedAt()
157 {
158 return $this->createdAt;
159 }
160
167 public function getLastModifiedAt()
168 {
169 return $this->lastModifiedAt;
170 }
171
178 public function getLastModifiedBy()
179 {
180 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
181 }
182
189 public function getCreatedBy()
190 {
191 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
192 }
193
201 public function getSequenceNumber()
202 {
203 return $this->sequenceNumber;
204 }
205
212 public function getResource()
213 {
214 return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
215 }
216
223 public function getResourceVersion()
224 {
225 return $this->resourceVersion;
226 }
227
235 {
236 return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
237 }
238
245 public function getOldState()
246 {
247 return $this->oldState instanceof StateReferenceBuilder ? $this->oldState->build() : $this->oldState;
248 }
249
256 public function getNewState()
257 {
258 return $this->newState instanceof StateReferenceBuilder ? $this->newState->build() : $this->newState;
259 }
260
268 {
269 return $this->oldIncludedInStatistics;
270 }
271
279 {
280 return $this->newIncludedInStatistics;
281 }
282
289 public function getTarget()
290 {
291 return $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target;
292 }
293
300 public function getForce()
301 {
302 return $this->force;
303 }
304
309 public function withId(?string $id)
310 {
311 $this->id = $id;
312
313 return $this;
314 }
315
320 public function withVersion(?int $version)
321 {
322 $this->version = $version;
323
324 return $this;
325 }
326
331 public function withCreatedAt(?DateTimeImmutable $createdAt)
332 {
333 $this->createdAt = $createdAt;
334
335 return $this;
336 }
337
342 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
343 {
344 $this->lastModifiedAt = $lastModifiedAt;
345
346 return $this;
347 }
348
353 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
354 {
355 $this->lastModifiedBy = $lastModifiedBy;
356
357 return $this;
358 }
359
364 public function withCreatedBy(?CreatedBy $createdBy)
365 {
366 $this->createdBy = $createdBy;
367
368 return $this;
369 }
370
375 public function withSequenceNumber(?int $sequenceNumber)
376 {
377 $this->sequenceNumber = $sequenceNumber;
378
379 return $this;
380 }
381
386 public function withResource(?Reference $resource)
387 {
388 $this->resource = $resource;
389
390 return $this;
391 }
392
397 public function withResourceVersion(?int $resourceVersion)
398 {
399 $this->resourceVersion = $resourceVersion;
400
401 return $this;
402 }
403
408 public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
409 {
410 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
411
412 return $this;
413 }
414
419 public function withOldState(?StateReference $oldState)
420 {
421 $this->oldState = $oldState;
422
423 return $this;
424 }
425
430 public function withNewState(?StateReference $newState)
431 {
432 $this->newState = $newState;
433
434 return $this;
435 }
436
441 public function withOldIncludedInStatistics(?bool $oldIncludedInStatistics)
442 {
443 $this->oldIncludedInStatistics = $oldIncludedInStatistics;
444
445 return $this;
446 }
447
452 public function withNewIncludedInStatistics(?bool $newIncludedInStatistics)
453 {
454 $this->newIncludedInStatistics = $newIncludedInStatistics;
455
456 return $this;
457 }
458
463 public function withTarget(?Reference $target)
464 {
465 $this->target = $target;
466
467 return $this;
468 }
469
474 public function withForce(?bool $force)
475 {
476 $this->force = $force;
477
478 return $this;
479 }
480
485 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
486 {
487 $this->lastModifiedBy = $lastModifiedBy;
488
489 return $this;
490 }
491
496 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
497 {
498 $this->createdBy = $createdBy;
499
500 return $this;
501 }
502
507 public function withResourceBuilder(?ReferenceBuilder $resource)
508 {
509 $this->resource = $resource;
510
511 return $this;
512 }
513
518 public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
519 {
520 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
521
522 return $this;
523 }
524
529 public function withOldStateBuilder(?StateReferenceBuilder $oldState)
530 {
531 $this->oldState = $oldState;
532
533 return $this;
534 }
535
540 public function withNewStateBuilder(?StateReferenceBuilder $newState)
541 {
542 $this->newState = $newState;
543
544 return $this;
545 }
546
551 public function withTargetBuilder(?ReferenceBuilder $target)
552 {
553 $this->target = $target;
554
555 return $this;
556 }
557
559 {
561 $this->id,
562 $this->version,
563 $this->createdAt,
564 $this->lastModifiedAt,
565 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
566 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
567 $this->sequenceNumber,
568 $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
569 $this->resourceVersion,
570 $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
571 $this->oldState instanceof StateReferenceBuilder ? $this->oldState->build() : $this->oldState,
572 $this->newState instanceof StateReferenceBuilder ? $this->newState->build() : $this->newState,
573 $this->oldIncludedInStatistics,
574 $this->newIncludedInStatistics,
575 $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target,
576 $this->force
577 );
578 }
579
580 public static function of(): ReviewStateTransitionMessageBuilder
581 {
582 return new self();
583 }
584}
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)