commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
StoreCreatedMessageBuilder.php
1<?php
2
3declare(strict_types=1);
10
29use DateTimeImmutable;
30use stdClass;
31
35final class StoreCreatedMessageBuilder implements Builder
36{
41 private $id;
42
47 private $version;
48
53 private $createdAt;
54
59 private $lastModifiedAt;
60
65 private $lastModifiedBy;
66
71 private $createdBy;
72
77 private $sequenceNumber;
78
83 private $resource;
84
89 private $resourceVersion;
90
95 private $resourceUserProvidedIdentifiers;
96
101 private $name;
102
107 private $languages;
108
113 private $countries;
114
119 private $distributionChannels;
120
125 private $supplyChannels;
126
131 private $productSelections;
132
137 private $custom;
138
145 public function getId()
146 {
147 return $this->id;
148 }
149
156 public function getVersion()
157 {
158 return $this->version;
159 }
160
167 public function getCreatedAt()
168 {
169 return $this->createdAt;
170 }
171
178 public function getLastModifiedAt()
179 {
180 return $this->lastModifiedAt;
181 }
182
189 public function getLastModifiedBy()
190 {
191 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
192 }
193
200 public function getCreatedBy()
201 {
202 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
203 }
204
212 public function getSequenceNumber()
213 {
214 return $this->sequenceNumber;
215 }
216
223 public function getResource()
224 {
225 return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
226 }
227
234 public function getResourceVersion()
235 {
236 return $this->resourceVersion;
237 }
238
246 {
247 return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
248 }
249
256 public function getName()
257 {
258 return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;
259 }
260
267 public function getLanguages()
268 {
269 return $this->languages;
270 }
271
278 public function getCountries()
279 {
280 return $this->countries;
281 }
282
289 public function getDistributionChannels()
290 {
291 return $this->distributionChannels;
292 }
293
300 public function getSupplyChannels()
301 {
302 return $this->supplyChannels;
303 }
304
311 public function getProductSelections()
312 {
313 return $this->productSelections;
314 }
315
322 public function getCustom()
323 {
324 return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom;
325 }
326
331 public function withId(?string $id)
332 {
333 $this->id = $id;
334
335 return $this;
336 }
337
342 public function withVersion(?int $version)
343 {
344 $this->version = $version;
345
346 return $this;
347 }
348
353 public function withCreatedAt(?DateTimeImmutable $createdAt)
354 {
355 $this->createdAt = $createdAt;
356
357 return $this;
358 }
359
364 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
365 {
366 $this->lastModifiedAt = $lastModifiedAt;
367
368 return $this;
369 }
370
375 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
376 {
377 $this->lastModifiedBy = $lastModifiedBy;
378
379 return $this;
380 }
381
386 public function withCreatedBy(?CreatedBy $createdBy)
387 {
388 $this->createdBy = $createdBy;
389
390 return $this;
391 }
392
397 public function withSequenceNumber(?int $sequenceNumber)
398 {
399 $this->sequenceNumber = $sequenceNumber;
400
401 return $this;
402 }
403
408 public function withResource(?Reference $resource)
409 {
410 $this->resource = $resource;
411
412 return $this;
413 }
414
419 public function withResourceVersion(?int $resourceVersion)
420 {
421 $this->resourceVersion = $resourceVersion;
422
423 return $this;
424 }
425
430 public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
431 {
432 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
433
434 return $this;
435 }
436
441 public function withName(?LocalizedString $name)
442 {
443 $this->name = $name;
444
445 return $this;
446 }
447
452 public function withLanguages(?array $languages)
453 {
454 $this->languages = $languages;
455
456 return $this;
457 }
458
463 public function withCountries(?StoreCountryCollection $countries)
464 {
465 $this->countries = $countries;
466
467 return $this;
468 }
469
474 public function withDistributionChannels(?ChannelReferenceCollection $distributionChannels)
475 {
476 $this->distributionChannels = $distributionChannels;
477
478 return $this;
479 }
480
485 public function withSupplyChannels(?ChannelReferenceCollection $supplyChannels)
486 {
487 $this->supplyChannels = $supplyChannels;
488
489 return $this;
490 }
491
496 public function withProductSelections(?ProductSelectionSettingCollection $productSelections)
497 {
498 $this->productSelections = $productSelections;
499
500 return $this;
501 }
502
507 public function withCustom(?CustomFields $custom)
508 {
509 $this->custom = $custom;
510
511 return $this;
512 }
513
518 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
519 {
520 $this->lastModifiedBy = $lastModifiedBy;
521
522 return $this;
523 }
524
529 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
530 {
531 $this->createdBy = $createdBy;
532
533 return $this;
534 }
535
540 public function withResourceBuilder(?ReferenceBuilder $resource)
541 {
542 $this->resource = $resource;
543
544 return $this;
545 }
546
551 public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
552 {
553 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
554
555 return $this;
556 }
557
563 {
564 $this->name = $name;
565
566 return $this;
567 }
568
573 public function withCustomBuilder(?CustomFieldsBuilder $custom)
574 {
575 $this->custom = $custom;
576
577 return $this;
578 }
579
580 public function build(): StoreCreatedMessage
581 {
582 return new StoreCreatedMessageModel(
583 $this->id,
584 $this->version,
585 $this->createdAt,
586 $this->lastModifiedAt,
587 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
588 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
589 $this->sequenceNumber,
590 $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
591 $this->resourceVersion,
592 $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
593 $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name,
594 $this->languages,
595 $this->countries,
596 $this->distributionChannels,
597 $this->supplyChannels,
598 $this->productSelections,
599 $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom
600 );
601 }
602
603 public static function of(): StoreCreatedMessageBuilder
604 {
605 return new self();
606 }
607}
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
withDistributionChannels(?ChannelReferenceCollection $distributionChannels)
withProductSelections(?ProductSelectionSettingCollection $productSelections)
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)