commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ReviewRatingSetMessageBuilder.php
1<?php
2
3declare(strict_types=1);
10
22use DateTimeImmutable;
23use stdClass;
24
29{
34 private $id;
35
40 private $version;
41
46 private $createdAt;
47
52 private $lastModifiedAt;
53
58 private $lastModifiedBy;
59
64 private $createdBy;
65
70 private $sequenceNumber;
71
76 private $resource;
77
82 private $resourceVersion;
83
88 private $resourceUserProvidedIdentifiers;
89
94 private $oldRating;
95
100 private $newRating;
101
106 private $includedInStatistics;
107
112 private $target;
113
120 public function getId()
121 {
122 return $this->id;
123 }
124
131 public function getVersion()
132 {
133 return $this->version;
134 }
135
142 public function getCreatedAt()
143 {
144 return $this->createdAt;
145 }
146
153 public function getLastModifiedAt()
154 {
155 return $this->lastModifiedAt;
156 }
157
164 public function getLastModifiedBy()
165 {
166 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
167 }
168
175 public function getCreatedBy()
176 {
177 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
178 }
179
187 public function getSequenceNumber()
188 {
189 return $this->sequenceNumber;
190 }
191
198 public function getResource()
199 {
200 return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
201 }
202
209 public function getResourceVersion()
210 {
211 return $this->resourceVersion;
212 }
213
221 {
222 return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
223 }
224
231 public function getOldRating()
232 {
233 return $this->oldRating;
234 }
235
242 public function getNewRating()
243 {
244 return $this->newRating;
245 }
246
253 public function getIncludedInStatistics()
254 {
255 return $this->includedInStatistics;
256 }
257
264 public function getTarget()
265 {
266 return $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target;
267 }
268
273 public function withId(?string $id)
274 {
275 $this->id = $id;
276
277 return $this;
278 }
279
284 public function withVersion(?int $version)
285 {
286 $this->version = $version;
287
288 return $this;
289 }
290
295 public function withCreatedAt(?DateTimeImmutable $createdAt)
296 {
297 $this->createdAt = $createdAt;
298
299 return $this;
300 }
301
306 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
307 {
308 $this->lastModifiedAt = $lastModifiedAt;
309
310 return $this;
311 }
312
317 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
318 {
319 $this->lastModifiedBy = $lastModifiedBy;
320
321 return $this;
322 }
323
328 public function withCreatedBy(?CreatedBy $createdBy)
329 {
330 $this->createdBy = $createdBy;
331
332 return $this;
333 }
334
339 public function withSequenceNumber(?int $sequenceNumber)
340 {
341 $this->sequenceNumber = $sequenceNumber;
342
343 return $this;
344 }
345
350 public function withResource(?Reference $resource)
351 {
352 $this->resource = $resource;
353
354 return $this;
355 }
356
361 public function withResourceVersion(?int $resourceVersion)
362 {
363 $this->resourceVersion = $resourceVersion;
364
365 return $this;
366 }
367
372 public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
373 {
374 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
375
376 return $this;
377 }
378
383 public function withOldRating(?float $oldRating)
384 {
385 $this->oldRating = $oldRating;
386
387 return $this;
388 }
389
394 public function withNewRating(?float $newRating)
395 {
396 $this->newRating = $newRating;
397
398 return $this;
399 }
400
405 public function withIncludedInStatistics(?bool $includedInStatistics)
406 {
407 $this->includedInStatistics = $includedInStatistics;
408
409 return $this;
410 }
411
416 public function withTarget(?Reference $target)
417 {
418 $this->target = $target;
419
420 return $this;
421 }
422
427 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
428 {
429 $this->lastModifiedBy = $lastModifiedBy;
430
431 return $this;
432 }
433
438 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
439 {
440 $this->createdBy = $createdBy;
441
442 return $this;
443 }
444
449 public function withResourceBuilder(?ReferenceBuilder $resource)
450 {
451 $this->resource = $resource;
452
453 return $this;
454 }
455
460 public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
461 {
462 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
463
464 return $this;
465 }
466
471 public function withTargetBuilder(?ReferenceBuilder $target)
472 {
473 $this->target = $target;
474
475 return $this;
476 }
477
478 public function build(): ReviewRatingSetMessage
479 {
481 $this->id,
482 $this->version,
483 $this->createdAt,
484 $this->lastModifiedAt,
485 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
486 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
487 $this->sequenceNumber,
488 $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
489 $this->resourceVersion,
490 $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
491 $this->oldRating,
492 $this->newRating,
493 $this->includedInStatistics,
494 $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target
495 );
496 }
497
498 public static function of(): ReviewRatingSetMessageBuilder
499 {
500 return new self();
501 }
502}
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)