3declare(strict_types=1);
168 if (is_null($this->
id)) {
170 $data = $this->
raw(self::FIELD_ID);
171 if (is_null($data)) {
174 $this->
id = (string) $data;
188 if (is_null($this->version)) {
190 $data = $this->
raw(self::FIELD_VERSION);
191 if (is_null($data)) {
194 $this->version = (int) $data;
208 if (is_null($this->createdAt)) {
210 $data = $this->
raw(self::FIELD_CREATED_AT);
211 if (is_null($data)) {
214 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
215 if (
false === $data) {
218 $this->createdAt = $data;
232 if (is_null($this->lastModifiedAt)) {
234 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
235 if (is_null($data)) {
238 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
239 if (
false === $data) {
242 $this->lastModifiedAt = $data;
256 if (is_null($this->lastModifiedBy)) {
258 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
259 if (is_null($data)) {
263 $this->lastModifiedBy = LastModifiedByModel::of($data);
277 if (is_null($this->createdBy)) {
279 $data = $this->
raw(self::FIELD_CREATED_BY);
280 if (is_null($data)) {
284 $this->createdBy = CreatedByModel::of($data);
299 if (is_null($this->sequenceNumber)) {
301 $data = $this->
raw(self::FIELD_SEQUENCE_NUMBER);
302 if (is_null($data)) {
305 $this->sequenceNumber = (int) $data;
319 if (is_null($this->resource)) {
321 $data = $this->
raw(self::FIELD_RESOURCE);
322 if (is_null($data)) {
325 $className = ReferenceModel::resolveDiscriminatorClass($data);
326 $this->resource = $className::of($data);
340 if (is_null($this->resourceVersion)) {
342 $data = $this->
raw(self::FIELD_RESOURCE_VERSION);
343 if (is_null($data)) {
346 $this->resourceVersion = (int) $data;
360 if (is_null($this->type)) {
362 $data = $this->
raw(self::FIELD_TYPE);
363 if (is_null($data)) {
366 $this->type = (string) $data;
380 if (is_null($this->resourceUserProvidedIdentifiers)) {
382 $data = $this->
raw(self::FIELD_RESOURCE_USER_PROVIDED_IDENTIFIERS);
383 if (is_null($data)) {
401 if (is_null($this->product)) {
403 $data = $this->
raw(self::FIELD_PRODUCT);
404 if (is_null($data)) {
408 $this->product = ProductReferenceModel::of($data);
422 if (is_null($this->sku)) {
424 $data = $this->
raw(self::FIELD_SKU);
425 if (is_null($data)) {
428 $this->sku = (string) $data;
442 if (is_null($this->oldSku)) {
444 $data = $this->
raw(self::FIELD_OLD_SKU);
445 if (is_null($data)) {
448 $this->oldSku = (string) $data;
462 if (is_null($this->staged)) {
464 $data = $this->
raw(self::FIELD_STAGED);
465 if (is_null($data)) {
468 $this->staged = (bool) $data;
588 #[\ReturnTypeWillChange]
599 return (
object) $data;