commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ImportOperationStatusModel.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
22{
27 protected $operationId;
28
33 protected $state;
34
39 protected $errors;
40
41
45 public function __construct(
46 ?string $operationId = null,
47 ?string $state = null,
49 ) {
50 $this->operationId = $operationId;
51 $this->state = $state;
52 $this->errors = $errors;
53 }
54
61 public function getOperationId()
62 {
63 if (is_null($this->operationId)) {
65 $data = $this->raw(self::FIELD_OPERATION_ID);
66 if (is_null($data)) {
67 return null;
68 }
69 $this->operationId = (string) $data;
70 }
71
72 return $this->operationId;
73 }
74
81 public function getState()
82 {
83 if (is_null($this->state)) {
85 $data = $this->raw(self::FIELD_STATE);
86 if (is_null($data)) {
87 return null;
88 }
89 $this->state = (string) $data;
90 }
91
92 return $this->state;
93 }
94
102 public function getErrors()
103 {
104 if (is_null($this->errors)) {
106 $data = $this->raw(self::FIELD_ERRORS);
107 if (is_null($data)) {
108 return null;
109 }
110 $this->errors = ErrorObjectCollection::fromArray($data);
111 }
112
113 return $this->errors;
114 }
115
116
120 public function setOperationId(?string $operationId): void
121 {
122 $this->operationId = $operationId;
123 }
124
128 public function setState(?string $state): void
129 {
130 $this->state = $state;
131 }
132
137 {
138 $this->errors = $errors;
139 }
140}
__construct(?string $operationId=null, ?string $state=null, ?ErrorObjectCollection $errors=null)