commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ApprovalRuleApproversSetMessageBuilder.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 $approvers;
97 
102  private $oldApprovers;
103 
110  public function getId()
111  {
112  return $this->id;
113  }
114 
121  public function getVersion()
122  {
123  return $this->version;
124  }
125 
132  public function getCreatedAt()
133  {
134  return $this->createdAt;
135  }
136 
143  public function getLastModifiedAt()
144  {
145  return $this->lastModifiedAt;
146  }
147 
154  public function getLastModifiedBy()
155  {
156  return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
157  }
158 
165  public function getCreatedBy()
166  {
167  return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
168  }
169 
177  public function getSequenceNumber()
178  {
179  return $this->sequenceNumber;
180  }
181 
188  public function getResource()
189  {
190  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
191  }
192 
199  public function getResourceVersion()
200  {
201  return $this->resourceVersion;
202  }
203 
211  {
212  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
213  }
214 
221  public function getApprovers()
222  {
223  return $this->approvers instanceof ApproverHierarchyBuilder ? $this->approvers->build() : $this->approvers;
224  }
225 
232  public function getOldApprovers()
233  {
234  return $this->oldApprovers instanceof ApproverHierarchyBuilder ? $this->oldApprovers->build() : $this->oldApprovers;
235  }
236 
241  public function withId(?string $id)
242  {
243  $this->id = $id;
244 
245  return $this;
246  }
247 
252  public function withVersion(?int $version)
253  {
254  $this->version = $version;
255 
256  return $this;
257  }
258 
263  public function withCreatedAt(?DateTimeImmutable $createdAt)
264  {
265  $this->createdAt = $createdAt;
266 
267  return $this;
268  }
269 
274  public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
275  {
276  $this->lastModifiedAt = $lastModifiedAt;
277 
278  return $this;
279  }
280 
285  public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
286  {
287  $this->lastModifiedBy = $lastModifiedBy;
288 
289  return $this;
290  }
291 
296  public function withCreatedBy(?CreatedBy $createdBy)
297  {
298  $this->createdBy = $createdBy;
299 
300  return $this;
301  }
302 
307  public function withSequenceNumber(?int $sequenceNumber)
308  {
309  $this->sequenceNumber = $sequenceNumber;
310 
311  return $this;
312  }
313 
318  public function withResource(?Reference $resource)
319  {
320  $this->resource = $resource;
321 
322  return $this;
323  }
324 
329  public function withResourceVersion(?int $resourceVersion)
330  {
331  $this->resourceVersion = $resourceVersion;
332 
333  return $this;
334  }
335 
340  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
341  {
342  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
343 
344  return $this;
345  }
346 
351  public function withApprovers(?ApproverHierarchy $approvers)
352  {
353  $this->approvers = $approvers;
354 
355  return $this;
356  }
357 
362  public function withOldApprovers(?ApproverHierarchy $oldApprovers)
363  {
364  $this->oldApprovers = $oldApprovers;
365 
366  return $this;
367  }
368 
373  public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
374  {
375  $this->lastModifiedBy = $lastModifiedBy;
376 
377  return $this;
378  }
379 
384  public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
385  {
386  $this->createdBy = $createdBy;
387 
388  return $this;
389  }
390 
395  public function withResourceBuilder(?ReferenceBuilder $resource)
396  {
397  $this->resource = $resource;
398 
399  return $this;
400  }
401 
406  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
407  {
408  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
409 
410  return $this;
411  }
412 
417  public function withApproversBuilder(?ApproverHierarchyBuilder $approvers)
418  {
419  $this->approvers = $approvers;
420 
421  return $this;
422  }
423 
428  public function withOldApproversBuilder(?ApproverHierarchyBuilder $oldApprovers)
429  {
430  $this->oldApprovers = $oldApprovers;
431 
432  return $this;
433  }
434 
436  {
438  $this->id,
439  $this->version,
440  $this->createdAt,
441  $this->lastModifiedAt,
442  $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
443  $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
444  $this->sequenceNumber,
445  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
446  $this->resourceVersion,
447  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
448  $this->approvers instanceof ApproverHierarchyBuilder ? $this->approvers->build() : $this->approvers,
449  $this->oldApprovers instanceof ApproverHierarchyBuilder ? $this->oldApprovers->build() : $this->oldApprovers
450  );
451  }
452 
453  public static function of(): ApprovalRuleApproversSetMessageBuilder
454  {
455  return new self();
456  }
457 }
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)