commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ParcelAddedToDeliveryMessageBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
26 use DateTimeImmutable;
27 use stdClass;
28 
33 {
38  private $id;
39 
44  private $version;
45 
50  private $createdAt;
51 
56  private $lastModifiedAt;
57 
62  private $lastModifiedBy;
63 
68  private $createdBy;
69 
74  private $sequenceNumber;
75 
80  private $resource;
81 
86  private $resourceVersion;
87 
92  private $resourceUserProvidedIdentifiers;
93 
98  private $delivery;
99 
104  private $parcel;
105 
110  private $shippingKey;
111 
118  public function getId()
119  {
120  return $this->id;
121  }
122 
129  public function getVersion()
130  {
131  return $this->version;
132  }
133 
140  public function getCreatedAt()
141  {
142  return $this->createdAt;
143  }
144 
151  public function getLastModifiedAt()
152  {
153  return $this->lastModifiedAt;
154  }
155 
162  public function getLastModifiedBy()
163  {
164  return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
165  }
166 
173  public function getCreatedBy()
174  {
175  return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
176  }
177 
185  public function getSequenceNumber()
186  {
187  return $this->sequenceNumber;
188  }
189 
196  public function getResource()
197  {
198  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
199  }
200 
207  public function getResourceVersion()
208  {
209  return $this->resourceVersion;
210  }
211 
219  {
220  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
221  }
222 
229  public function getDelivery()
230  {
231  return $this->delivery instanceof DeliveryBuilder ? $this->delivery->build() : $this->delivery;
232  }
233 
240  public function getParcel()
241  {
242  return $this->parcel instanceof ParcelBuilder ? $this->parcel->build() : $this->parcel;
243  }
244 
251  public function getShippingKey()
252  {
253  return $this->shippingKey;
254  }
255 
260  public function withId(?string $id)
261  {
262  $this->id = $id;
263 
264  return $this;
265  }
266 
271  public function withVersion(?int $version)
272  {
273  $this->version = $version;
274 
275  return $this;
276  }
277 
282  public function withCreatedAt(?DateTimeImmutable $createdAt)
283  {
284  $this->createdAt = $createdAt;
285 
286  return $this;
287  }
288 
293  public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
294  {
295  $this->lastModifiedAt = $lastModifiedAt;
296 
297  return $this;
298  }
299 
304  public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
305  {
306  $this->lastModifiedBy = $lastModifiedBy;
307 
308  return $this;
309  }
310 
315  public function withCreatedBy(?CreatedBy $createdBy)
316  {
317  $this->createdBy = $createdBy;
318 
319  return $this;
320  }
321 
326  public function withSequenceNumber(?int $sequenceNumber)
327  {
328  $this->sequenceNumber = $sequenceNumber;
329 
330  return $this;
331  }
332 
337  public function withResource(?Reference $resource)
338  {
339  $this->resource = $resource;
340 
341  return $this;
342  }
343 
348  public function withResourceVersion(?int $resourceVersion)
349  {
350  $this->resourceVersion = $resourceVersion;
351 
352  return $this;
353  }
354 
359  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
360  {
361  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
362 
363  return $this;
364  }
365 
370  public function withDelivery(?Delivery $delivery)
371  {
372  $this->delivery = $delivery;
373 
374  return $this;
375  }
376 
381  public function withParcel(?Parcel $parcel)
382  {
383  $this->parcel = $parcel;
384 
385  return $this;
386  }
387 
392  public function withShippingKey(?string $shippingKey)
393  {
394  $this->shippingKey = $shippingKey;
395 
396  return $this;
397  }
398 
403  public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
404  {
405  $this->lastModifiedBy = $lastModifiedBy;
406 
407  return $this;
408  }
409 
414  public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
415  {
416  $this->createdBy = $createdBy;
417 
418  return $this;
419  }
420 
425  public function withResourceBuilder(?ReferenceBuilder $resource)
426  {
427  $this->resource = $resource;
428 
429  return $this;
430  }
431 
436  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
437  {
438  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
439 
440  return $this;
441  }
442 
447  public function withDeliveryBuilder(?DeliveryBuilder $delivery)
448  {
449  $this->delivery = $delivery;
450 
451  return $this;
452  }
453 
458  public function withParcelBuilder(?ParcelBuilder $parcel)
459  {
460  $this->parcel = $parcel;
461 
462  return $this;
463  }
464 
466  {
468  $this->id,
469  $this->version,
470  $this->createdAt,
471  $this->lastModifiedAt,
472  $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
473  $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
474  $this->sequenceNumber,
475  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
476  $this->resourceVersion,
477  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
478  $this->delivery instanceof DeliveryBuilder ? $this->delivery->build() : $this->delivery,
479  $this->parcel instanceof ParcelBuilder ? $this->parcel->build() : $this->parcel,
480  $this->shippingKey
481  );
482  }
483 
484  public static function of(): ParcelAddedToDeliveryMessageBuilder
485  {
486  return new self();
487  }
488 }
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)