3declare(strict_types=1);
161 if (is_null($this->key)) {
163 $data = $this->
raw(self::FIELD_KEY);
164 if (is_null($data)) {
167 $this->key = (string) $data;
181 if (is_null($this->name)) {
183 $data = $this->
raw(self::FIELD_NAME);
184 if (is_null($data)) {
188 $this->name = LocalizedStringModel::of($data);
205 if (is_null($this->productType)) {
207 $data = $this->
raw(self::FIELD_PRODUCT_TYPE);
208 if (is_null($data)) {
212 $this->productType = ProductTypeKeyReferenceModel::of($data);
227 if (is_null($this->slug)) {
229 $data = $this->
raw(self::FIELD_SLUG);
230 if (is_null($data)) {
234 $this->slug = LocalizedStringModel::of($data);
248 if (is_null($this->description)) {
250 $data = $this->
raw(self::FIELD_DESCRIPTION);
251 if (is_null($data)) {
255 $this->description = LocalizedStringModel::of($data);
271 if (is_null($this->categories)) {
273 $data = $this->
raw(self::FIELD_CATEGORIES);
274 if (is_null($data)) {
277 $this->categories = CategoryKeyReferenceCollection::fromArray($data);
296 if (is_null($this->metaTitle)) {
298 $data = $this->
raw(self::FIELD_META_TITLE);
299 if (is_null($data)) {
303 $this->metaTitle = LocalizedStringModel::of($data);
322 if (is_null($this->metaDescription)) {
324 $data = $this->
raw(self::FIELD_META_DESCRIPTION);
325 if (is_null($data)) {
329 $this->metaDescription = LocalizedStringModel::of($data);
348 if (is_null($this->metaKeywords)) {
350 $data = $this->
raw(self::FIELD_META_KEYWORDS);
351 if (is_null($data)) {
355 $this->metaKeywords = LocalizedStringModel::of($data);
370 if (is_null($this->taxCategory)) {
372 $data = $this->
raw(self::FIELD_TAX_CATEGORY);
373 if (is_null($data)) {
377 $this->taxCategory = TaxCategoryKeyReferenceModel::of($data);
407 if (is_null($this->searchKeywords)) {
409 $data = $this->
raw(self::FIELD_SEARCH_KEYWORDS);
410 if (is_null($data)) {
429 if (is_null($this->state)) {
431 $data = $this->
raw(self::FIELD_STATE);
432 if (is_null($data)) {
436 $this->state = StateKeyReferenceModel::of($data);
450 if (is_null($this->publish)) {
452 $data = $this->
raw(self::FIELD_PUBLISH);
453 if (is_null($data)) {
456 $this->publish = (bool) $data;
470 if (is_null($this->priceMode)) {
472 $data = $this->
raw(self::FIELD_PRICE_MODE);
473 if (is_null($data)) {
476 $this->priceMode = (string) $data;