3declare(strict_types=1);
171 if (is_null($this->
id)) {
173 $data = $this->
raw(self::FIELD_ID);
174 if (is_null($data)) {
177 $this->
id = (string) $data;
191 if (is_null($this->version)) {
193 $data = $this->
raw(self::FIELD_VERSION);
194 if (is_null($data)) {
197 $this->version = (int) $data;
211 if (is_null($this->createdAt)) {
213 $data = $this->
raw(self::FIELD_CREATED_AT);
214 if (is_null($data)) {
217 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
218 if (
false === $data) {
221 $this->createdAt = $data;
235 if (is_null($this->lastModifiedAt)) {
237 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
238 if (is_null($data)) {
241 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
242 if (
false === $data) {
245 $this->lastModifiedAt = $data;
259 if (is_null($this->lastModifiedBy)) {
261 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
262 if (is_null($data)) {
266 $this->lastModifiedBy = LastModifiedByModel::of($data);
280 if (is_null($this->createdBy)) {
282 $data = $this->
raw(self::FIELD_CREATED_BY);
283 if (is_null($data)) {
287 $this->createdBy = CreatedByModel::of($data);
301 if (is_null($this->key)) {
303 $data = $this->
raw(self::FIELD_KEY);
304 if (is_null($data)) {
307 $this->key = (string) $data;
321 if (is_null($this->name)) {
323 $data = $this->
raw(self::FIELD_NAME);
324 if (is_null($data)) {
328 $this->name = LocalizedStringModel::of($data);
342 if (is_null($this->languages)) {
344 $data = $this->
raw(self::FIELD_LANGUAGES);
345 if (is_null($data)) {
348 $this->languages = $data;
362 if (is_null($this->countries)) {
364 $data = $this->
raw(self::FIELD_COUNTRIES);
365 if (is_null($data)) {
368 $this->countries = StoreCountryCollection::fromArray($data);
382 if (is_null($this->distributionChannels)) {
384 $data = $this->
raw(self::FIELD_DISTRIBUTION_CHANNELS);
385 if (is_null($data)) {
388 $this->distributionChannels = ChannelReferenceCollection::fromArray($data);
402 if (is_null($this->supplyChannels)) {
404 $data = $this->
raw(self::FIELD_SUPPLY_CHANNELS);
405 if (is_null($data)) {
408 $this->supplyChannels = ChannelReferenceCollection::fromArray($data);
428 if (is_null($this->productSelections)) {
430 $data = $this->
raw(self::FIELD_PRODUCT_SELECTIONS);
431 if (is_null($data)) {
448 if (is_null($this->custom)) {
450 $data = $this->
raw(self::FIELD_CUSTOM);
451 if (is_null($data)) {
455 $this->custom = CustomFieldsModel::of($data);
469 if (is_null($this->storefront)) {
471 $data = $this->
raw(self::FIELD_STOREFRONT);
472 if (is_null($data)) {
604 #[\ReturnTypeWillChange]
615 return (
object) $data;