commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
UnresolvedReferencesModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $key;
27 
32  protected $typeId;
33 
34 
38  public function __construct(
39  ?string $key = null,
40  ?string $typeId = null
41  ) {
42  $this->key = $key;
43  $this->typeId = $typeId;
44  }
45 
50  public function getKey()
51  {
52  if (is_null($this->key)) {
54  $data = $this->raw(self::FIELD_KEY);
55  if (is_null($data)) {
56  return null;
57  }
58  $this->key = (string) $data;
59  }
60 
61  return $this->key;
62  }
63 
70  public function getTypeId()
71  {
72  if (is_null($this->typeId)) {
74  $data = $this->raw(self::FIELD_TYPE_ID);
75  if (is_null($data)) {
76  return null;
77  }
78  $this->typeId = (string) $data;
79  }
80 
81  return $this->typeId;
82  }
83 
84 
88  public function setKey(?string $key): void
89  {
90  $this->key = $key;
91  }
92 
96  public function setTypeId(?string $typeId): void
97  {
98  $this->typeId = $typeId;
99  }
100 }