3declare(strict_types=1);
163 if (is_null($this->
id)) {
165 $data = $this->
raw(self::FIELD_ID);
166 if (is_null($data)) {
169 $this->
id = (string) $data;
183 if (is_null($this->version)) {
185 $data = $this->
raw(self::FIELD_VERSION);
186 if (is_null($data)) {
189 $this->version = (int) $data;
203 if (is_null($this->createdAt)) {
205 $data = $this->
raw(self::FIELD_CREATED_AT);
206 if (is_null($data)) {
209 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
210 if (
false === $data) {
213 $this->createdAt = $data;
227 if (is_null($this->lastModifiedAt)) {
229 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
230 if (is_null($data)) {
233 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
234 if (
false === $data) {
237 $this->lastModifiedAt = $data;
251 if (is_null($this->lastModifiedBy)) {
253 $data = $this->
raw(self::FIELD_LAST_MODIFIED_BY);
254 if (is_null($data)) {
258 $this->lastModifiedBy = LastModifiedByModel::of($data);
272 if (is_null($this->createdBy)) {
274 $data = $this->
raw(self::FIELD_CREATED_BY);
275 if (is_null($data)) {
279 $this->createdBy = CreatedByModel::of($data);
293 if (is_null($this->key)) {
295 $data = $this->
raw(self::FIELD_KEY);
296 if (is_null($data)) {
299 $this->key = (string) $data;
313 if (is_null($this->name)) {
315 $data = $this->
raw(self::FIELD_NAME);
316 if (is_null($data)) {
320 $this->name = LocalizedStringModel::of($data);
334 if (is_null($this->languages)) {
336 $data = $this->
raw(self::FIELD_LANGUAGES);
337 if (is_null($data)) {
340 $this->languages = $data;
354 if (is_null($this->countries)) {
356 $data = $this->
raw(self::FIELD_COUNTRIES);
357 if (is_null($data)) {
360 $this->countries = StoreCountryCollection::fromArray($data);
374 if (is_null($this->distributionChannels)) {
376 $data = $this->
raw(self::FIELD_DISTRIBUTION_CHANNELS);
377 if (is_null($data)) {
380 $this->distributionChannels = ChannelReferenceCollection::fromArray($data);
394 if (is_null($this->supplyChannels)) {
396 $data = $this->
raw(self::FIELD_SUPPLY_CHANNELS);
397 if (is_null($data)) {
400 $this->supplyChannels = ChannelReferenceCollection::fromArray($data);
420 if (is_null($this->productSelections)) {
422 $data = $this->
raw(self::FIELD_PRODUCT_SELECTIONS);
423 if (is_null($data)) {
440 if (is_null($this->custom)) {
442 $data = $this->
raw(self::FIELD_CUSTOM);
443 if (is_null($data)) {
447 $this->custom = CustomFieldsModel::of($data);
567 #[\ReturnTypeWillChange]
578 return (
object) $data;