commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ParcelRemovedFromDeliveryMessageBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
24 use DateTimeImmutable;
25 use 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 $deliveryId;
97 
102  private $parcel;
103 
108  private $shippingKey;
109 
116  public function getId()
117  {
118  return $this->id;
119  }
120 
127  public function getVersion()
128  {
129  return $this->version;
130  }
131 
138  public function getCreatedAt()
139  {
140  return $this->createdAt;
141  }
142 
149  public function getLastModifiedAt()
150  {
151  return $this->lastModifiedAt;
152  }
153 
160  public function getLastModifiedBy()
161  {
162  return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
163  }
164 
171  public function getCreatedBy()
172  {
173  return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
174  }
175 
183  public function getSequenceNumber()
184  {
185  return $this->sequenceNumber;
186  }
187 
194  public function getResource()
195  {
196  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
197  }
198 
205  public function getResourceVersion()
206  {
207  return $this->resourceVersion;
208  }
209 
217  {
218  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
219  }
220 
227  public function getDeliveryId()
228  {
229  return $this->deliveryId;
230  }
231 
238  public function getParcel()
239  {
240  return $this->parcel instanceof ParcelBuilder ? $this->parcel->build() : $this->parcel;
241  }
242 
249  public function getShippingKey()
250  {
251  return $this->shippingKey;
252  }
253 
258  public function withId(?string $id)
259  {
260  $this->id = $id;
261 
262  return $this;
263  }
264 
269  public function withVersion(?int $version)
270  {
271  $this->version = $version;
272 
273  return $this;
274  }
275 
280  public function withCreatedAt(?DateTimeImmutable $createdAt)
281  {
282  $this->createdAt = $createdAt;
283 
284  return $this;
285  }
286 
291  public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
292  {
293  $this->lastModifiedAt = $lastModifiedAt;
294 
295  return $this;
296  }
297 
302  public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
303  {
304  $this->lastModifiedBy = $lastModifiedBy;
305 
306  return $this;
307  }
308 
313  public function withCreatedBy(?CreatedBy $createdBy)
314  {
315  $this->createdBy = $createdBy;
316 
317  return $this;
318  }
319 
324  public function withSequenceNumber(?int $sequenceNumber)
325  {
326  $this->sequenceNumber = $sequenceNumber;
327 
328  return $this;
329  }
330 
335  public function withResource(?Reference $resource)
336  {
337  $this->resource = $resource;
338 
339  return $this;
340  }
341 
346  public function withResourceVersion(?int $resourceVersion)
347  {
348  $this->resourceVersion = $resourceVersion;
349 
350  return $this;
351  }
352 
357  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
358  {
359  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
360 
361  return $this;
362  }
363 
368  public function withDeliveryId(?string $deliveryId)
369  {
370  $this->deliveryId = $deliveryId;
371 
372  return $this;
373  }
374 
379  public function withParcel(?Parcel $parcel)
380  {
381  $this->parcel = $parcel;
382 
383  return $this;
384  }
385 
390  public function withShippingKey(?string $shippingKey)
391  {
392  $this->shippingKey = $shippingKey;
393 
394  return $this;
395  }
396 
401  public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
402  {
403  $this->lastModifiedBy = $lastModifiedBy;
404 
405  return $this;
406  }
407 
412  public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
413  {
414  $this->createdBy = $createdBy;
415 
416  return $this;
417  }
418 
423  public function withResourceBuilder(?ReferenceBuilder $resource)
424  {
425  $this->resource = $resource;
426 
427  return $this;
428  }
429 
434  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
435  {
436  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
437 
438  return $this;
439  }
440 
445  public function withParcelBuilder(?ParcelBuilder $parcel)
446  {
447  $this->parcel = $parcel;
448 
449  return $this;
450  }
451 
453  {
455  $this->id,
456  $this->version,
457  $this->createdAt,
458  $this->lastModifiedAt,
459  $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
460  $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
461  $this->sequenceNumber,
462  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
463  $this->resourceVersion,
464  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
465  $this->deliveryId,
466  $this->parcel instanceof ParcelBuilder ? $this->parcel->build() : $this->parcel,
467  $this->shippingKey
468  );
469  }
470 
471  public static function of(): ParcelRemovedFromDeliveryMessageBuilder
472  {
473  return new self();
474  }
475 }
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)