3declare(strict_types=1);
100 if (is_null($this->key)) {
102 $data = $this->
raw(self::FIELD_KEY);
103 if (is_null($data)) {
106 $this->key = (string) $data;
120 if (is_null($this->sku)) {
122 $data = $this->
raw(self::FIELD_SKU);
123 if (is_null($data)) {
126 $this->sku = (string) $data;
140 if (is_null($this->product)) {
142 $data = $this->
raw(self::FIELD_PRODUCT);
143 if (is_null($data)) {
147 $this->product = ProductResourceIdentifierModel::of($data);
162 if (is_null($this->publish)) {
164 $data = $this->
raw(self::FIELD_PUBLISH);
165 if (is_null($data)) {
168 $this->publish = (bool) $data;
182 if (is_null($this->images)) {
184 $data = $this->
raw(self::FIELD_IMAGES);
185 if (is_null($data)) {
188 $this->images = ImageCollection::fromArray($data);
202 if (is_null($this->attributes)) {
204 $data = $this->
raw(self::FIELD_ATTRIBUTES);
205 if (is_null($data)) {
208 $this->attributes = AttributeCollection::fromArray($data);
222 if (is_null($this->assets)) {
224 $data = $this->
raw(self::FIELD_ASSETS);
225 if (is_null($data)) {
228 $this->assets = AssetDraftCollection::fromArray($data);