commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ImportOperationStatusBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
22 final class ImportOperationStatusBuilder implements Builder
23 {
28  private $operationId;
29 
34  private $state;
35 
40  private $errors;
41 
48  public function getOperationId()
49  {
50  return $this->operationId;
51  }
52 
59  public function getState()
60  {
61  return $this->state;
62  }
63 
71  public function getErrors()
72  {
73  return $this->errors;
74  }
75 
80  public function withOperationId(?string $operationId)
81  {
82  $this->operationId = $operationId;
83 
84  return $this;
85  }
86 
91  public function withState(?string $state)
92  {
93  $this->state = $state;
94 
95  return $this;
96  }
97 
102  public function withErrors(?ErrorObjectCollection $errors)
103  {
104  $this->errors = $errors;
105 
106  return $this;
107  }
108 
109 
110  public function build(): ImportOperationStatus
111  {
112  return new ImportOperationStatusModel(
113  $this->operationId,
114  $this->state,
115  $this->errors
116  );
117  }
118 
119  public static function of(): ImportOperationStatusBuilder
120  {
121  return new self();
122  }
123 }