commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
StoreCountriesChangedMessageBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
23 use DateTimeImmutable;
24 use stdClass;
25 
30 {
35  private $id;
36 
41  private $version;
42 
47  private $createdAt;
48 
53  private $lastModifiedAt;
54 
59  private $lastModifiedBy;
60 
65  private $createdBy;
66 
71  private $sequenceNumber;
72 
77  private $resource;
78 
83  private $resourceVersion;
84 
89  private $resourceUserProvidedIdentifiers;
90 
95  private $addedCountries;
96 
101  private $removedCountries;
102 
109  public function getId()
110  {
111  return $this->id;
112  }
113 
120  public function getVersion()
121  {
122  return $this->version;
123  }
124 
131  public function getCreatedAt()
132  {
133  return $this->createdAt;
134  }
135 
142  public function getLastModifiedAt()
143  {
144  return $this->lastModifiedAt;
145  }
146 
153  public function getLastModifiedBy()
154  {
155  return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
156  }
157 
164  public function getCreatedBy()
165  {
166  return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
167  }
168 
176  public function getSequenceNumber()
177  {
178  return $this->sequenceNumber;
179  }
180 
187  public function getResource()
188  {
189  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
190  }
191 
198  public function getResourceVersion()
199  {
200  return $this->resourceVersion;
201  }
202 
210  {
211  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
212  }
213 
220  public function getAddedCountries()
221  {
222  return $this->addedCountries;
223  }
224 
231  public function getRemovedCountries()
232  {
233  return $this->removedCountries;
234  }
235 
240  public function withId(?string $id)
241  {
242  $this->id = $id;
243 
244  return $this;
245  }
246 
251  public function withVersion(?int $version)
252  {
253  $this->version = $version;
254 
255  return $this;
256  }
257 
262  public function withCreatedAt(?DateTimeImmutable $createdAt)
263  {
264  $this->createdAt = $createdAt;
265 
266  return $this;
267  }
268 
273  public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
274  {
275  $this->lastModifiedAt = $lastModifiedAt;
276 
277  return $this;
278  }
279 
284  public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
285  {
286  $this->lastModifiedBy = $lastModifiedBy;
287 
288  return $this;
289  }
290 
295  public function withCreatedBy(?CreatedBy $createdBy)
296  {
297  $this->createdBy = $createdBy;
298 
299  return $this;
300  }
301 
306  public function withSequenceNumber(?int $sequenceNumber)
307  {
308  $this->sequenceNumber = $sequenceNumber;
309 
310  return $this;
311  }
312 
317  public function withResource(?Reference $resource)
318  {
319  $this->resource = $resource;
320 
321  return $this;
322  }
323 
328  public function withResourceVersion(?int $resourceVersion)
329  {
330  $this->resourceVersion = $resourceVersion;
331 
332  return $this;
333  }
334 
339  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
340  {
341  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
342 
343  return $this;
344  }
345 
350  public function withAddedCountries(?StoreCountryCollection $addedCountries)
351  {
352  $this->addedCountries = $addedCountries;
353 
354  return $this;
355  }
356 
361  public function withRemovedCountries(?StoreCountryCollection $removedCountries)
362  {
363  $this->removedCountries = $removedCountries;
364 
365  return $this;
366  }
367 
372  public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
373  {
374  $this->lastModifiedBy = $lastModifiedBy;
375 
376  return $this;
377  }
378 
383  public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
384  {
385  $this->createdBy = $createdBy;
386 
387  return $this;
388  }
389 
394  public function withResourceBuilder(?ReferenceBuilder $resource)
395  {
396  $this->resource = $resource;
397 
398  return $this;
399  }
400 
405  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
406  {
407  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
408 
409  return $this;
410  }
411 
413  {
415  $this->id,
416  $this->version,
417  $this->createdAt,
418  $this->lastModifiedAt,
419  $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
420  $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
421  $this->sequenceNumber,
422  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
423  $this->resourceVersion,
424  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
425  $this->addedCountries,
426  $this->removedCountries
427  );
428  }
429 
430  public static function of(): StoreCountriesChangedMessageBuilder
431  {
432  return new self();
433  }
434 }
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)