3declare(strict_types=1);
169 if (is_null($this->
id)) {
171 $data = $this->
raw(self::FIELD_ID);
172 if (is_null($data)) {
175 $this->
id = (string) $data;
189 if (is_null($this->version)) {
191 $data = $this->
raw(self::FIELD_VERSION);
192 if (is_null($data)) {
195 $this->version = (int) $data;
209 if (is_null($this->createdAt)) {
211 $data = $this->
raw(self::FIELD_CREATED_AT);
212 if (is_null($data)) {
215 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
216 if (
false === $data) {
219 $this->createdAt = $data;
233 if (is_null($this->lastModifiedAt)) {
235 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
236 if (is_null($data)) {
239 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
240 if (
false === $data) {
243 $this->lastModifiedAt = $data;
257 if (is_null($this->lastModifiedBy)) {
259 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
260 if (is_null($data)) {
264 $this->lastModifiedBy = LastModifiedByModel::of($data);
278 if (is_null($this->createdBy)) {
280 $data = $this->
raw(self::FIELD_CREATED_BY);
281 if (is_null($data)) {
285 $this->createdBy = CreatedByModel::of($data);
300 if (is_null($this->sequenceNumber)) {
302 $data = $this->
raw(self::FIELD_SEQUENCE_NUMBER);
303 if (is_null($data)) {
306 $this->sequenceNumber = (int) $data;
320 if (is_null($this->resource)) {
322 $data = $this->
raw(self::FIELD_RESOURCE);
323 if (is_null($data)) {
326 $className = ReferenceModel::resolveDiscriminatorClass($data);
327 $this->resource = $className::of($data);
341 if (is_null($this->resourceVersion)) {
343 $data = $this->
raw(self::FIELD_RESOURCE_VERSION);
344 if (is_null($data)) {
347 $this->resourceVersion = (int) $data;
361 if (is_null($this->type)) {
363 $data = $this->
raw(self::FIELD_TYPE);
364 if (is_null($data)) {
367 $this->type = (string) $data;
381 if (is_null($this->resourceUserProvidedIdentifiers)) {
383 $data = $this->
raw(self::FIELD_RESOURCE_USER_PROVIDED_IDENTIFIERS);
384 if (is_null($data)) {
402 if (is_null($this->product)) {
404 $data = $this->
raw(self::FIELD_PRODUCT);
405 if (is_null($data)) {
409 $this->product = ProductReferenceModel::of($data);
423 if (is_null($this->images)) {
425 $data = $this->
raw(self::FIELD_IMAGES);
426 if (is_null($data)) {
429 $this->images = ImageCollection::fromArray($data);
443 if (is_null($this->oldImages)) {
445 $data = $this->
raw(self::FIELD_OLD_IMAGES);
446 if (is_null($data)) {
449 $this->oldImages = ImageCollection::fromArray($data);
463 if (is_null($this->staged)) {
465 $data = $this->
raw(self::FIELD_STAGED);
466 if (is_null($data)) {
469 $this->staged = (bool) $data;
589 #[\ReturnTypeWillChange]
600 return (
object) $data;