3declare(strict_types=1);
162 if (is_null($this->
id)) {
164 $data = $this->
raw(self::FIELD_ID);
165 if (is_null($data)) {
168 $this->
id = (string) $data;
182 if (is_null($this->version)) {
184 $data = $this->
raw(self::FIELD_VERSION);
185 if (is_null($data)) {
188 $this->version = (int) $data;
202 if (is_null($this->createdAt)) {
204 $data = $this->
raw(self::FIELD_CREATED_AT);
205 if (is_null($data)) {
208 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
209 if (
false === $data) {
212 $this->createdAt = $data;
226 if (is_null($this->lastModifiedAt)) {
228 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
229 if (is_null($data)) {
232 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
233 if (
false === $data) {
236 $this->lastModifiedAt = $data;
250 if (is_null($this->lastModifiedBy)) {
252 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
253 if (is_null($data)) {
257 $this->lastModifiedBy = LastModifiedByModel::of($data);
271 if (is_null($this->createdBy)) {
273 $data = $this->
raw(self::FIELD_CREATED_BY);
274 if (is_null($data)) {
278 $this->createdBy = CreatedByModel::of($data);
292 if (is_null($this->key)) {
294 $data = $this->
raw(self::FIELD_KEY);
295 if (is_null($data)) {
298 $this->key = (string) $data;
312 if (is_null($this->store)) {
314 $data = $this->
raw(self::FIELD_STORE);
315 if (is_null($data)) {
319 $this->store = StoreKeyReferenceModel::of($data);
333 if (is_null($this->product)) {
335 $data = $this->
raw(self::FIELD_PRODUCT);
336 if (is_null($data)) {
340 $this->product = ProductReferenceModel::of($data);
356 if (is_null($this->published)) {
358 $data = $this->
raw(self::FIELD_PUBLISHED);
359 if (is_null($data)) {
362 $this->published = (bool) $data;
376 if (is_null($this->current)) {
378 $data = $this->
raw(self::FIELD_CURRENT);
379 if (is_null($data)) {
397 if (is_null($this->staged)) {
399 $data = $this->
raw(self::FIELD_STAGED);
400 if (is_null($data)) {
418 if (is_null($this->hasStagedChanges)) {
420 $data = $this->
raw(self::FIELD_HAS_STAGED_CHANGES);
421 if (is_null($data)) {
424 $this->hasStagedChanges = (bool) $data;
439 if (is_null($this->warnings)) {
441 $data = $this->
raw(self::FIELD_WARNINGS);
442 if (is_null($data)) {
445 $this->warnings = WarningObjectCollection::fromArray($data);
565 #[\ReturnTypeWillChange]
576 return (
object) $data;