commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
QuoteDeletedMessageBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
22 use DateTimeImmutable;
23 use stdClass;
24 
28 final class QuoteDeletedMessageBuilder implements Builder
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 
96  public function getId()
97  {
98  return $this->id;
99  }
100 
107  public function getVersion()
108  {
109  return $this->version;
110  }
111 
118  public function getCreatedAt()
119  {
120  return $this->createdAt;
121  }
122 
129  public function getLastModifiedAt()
130  {
131  return $this->lastModifiedAt;
132  }
133 
140  public function getLastModifiedBy()
141  {
142  return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
143  }
144 
151  public function getCreatedBy()
152  {
153  return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
154  }
155 
163  public function getSequenceNumber()
164  {
165  return $this->sequenceNumber;
166  }
167 
174  public function getResource()
175  {
176  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
177  }
178 
185  public function getResourceVersion()
186  {
187  return $this->resourceVersion;
188  }
189 
197  {
198  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
199  }
200 
205  public function withId(?string $id)
206  {
207  $this->id = $id;
208 
209  return $this;
210  }
211 
216  public function withVersion(?int $version)
217  {
218  $this->version = $version;
219 
220  return $this;
221  }
222 
227  public function withCreatedAt(?DateTimeImmutable $createdAt)
228  {
229  $this->createdAt = $createdAt;
230 
231  return $this;
232  }
233 
238  public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
239  {
240  $this->lastModifiedAt = $lastModifiedAt;
241 
242  return $this;
243  }
244 
249  public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
250  {
251  $this->lastModifiedBy = $lastModifiedBy;
252 
253  return $this;
254  }
255 
260  public function withCreatedBy(?CreatedBy $createdBy)
261  {
262  $this->createdBy = $createdBy;
263 
264  return $this;
265  }
266 
271  public function withSequenceNumber(?int $sequenceNumber)
272  {
273  $this->sequenceNumber = $sequenceNumber;
274 
275  return $this;
276  }
277 
282  public function withResource(?Reference $resource)
283  {
284  $this->resource = $resource;
285 
286  return $this;
287  }
288 
293  public function withResourceVersion(?int $resourceVersion)
294  {
295  $this->resourceVersion = $resourceVersion;
296 
297  return $this;
298  }
299 
304  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
305  {
306  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
307 
308  return $this;
309  }
310 
315  public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
316  {
317  $this->lastModifiedBy = $lastModifiedBy;
318 
319  return $this;
320  }
321 
326  public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
327  {
328  $this->createdBy = $createdBy;
329 
330  return $this;
331  }
332 
337  public function withResourceBuilder(?ReferenceBuilder $resource)
338  {
339  $this->resource = $resource;
340 
341  return $this;
342  }
343 
348  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
349  {
350  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
351 
352  return $this;
353  }
354 
355  public function build(): QuoteDeletedMessage
356  {
357  return new QuoteDeletedMessageModel(
358  $this->id,
359  $this->version,
360  $this->createdAt,
361  $this->lastModifiedAt,
362  $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
363  $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
364  $this->sequenceNumber,
365  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
366  $this->resourceVersion,
367  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers
368  );
369  }
370 
371  public static function of(): QuoteDeletedMessageBuilder
372  {
373  return new self();
374  }
375 }
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)