commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ReferencedResourceNotFoundModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
22  public const DISCRIMINATOR_VALUE = 'ReferencedResourceNotFound';
27  protected $code;
28 
33  protected $message;
34 
39  protected $typeId;
40 
45  protected $id;
46 
51  protected $key;
52 
53 
57  public function __construct(
58  ?string $message = null,
59  ?string $typeId = null,
60  ?string $id = null,
61  ?string $key = null,
62  ?string $code = null
63  ) {
64  $this->message = $message;
65  $this->typeId = $typeId;
66  $this->id = $id;
67  $this->key = $key;
68  $this->code = $code ?? self::DISCRIMINATOR_VALUE;
69  }
70 
75  public function getCode()
76  {
77  if (is_null($this->code)) {
79  $data = $this->raw(self::FIELD_CODE);
80  if (is_null($data)) {
81  return null;
82  }
83  $this->code = (string) $data;
84  }
85 
86  return $this->code;
87  }
88 
95  public function getMessage()
96  {
97  if (is_null($this->message)) {
99  $data = $this->raw(self::FIELD_MESSAGE);
100  if (is_null($data)) {
101  return null;
102  }
103  $this->message = (string) $data;
104  }
105 
106  return $this->message;
107  }
108 
115  public function getTypeId()
116  {
117  if (is_null($this->typeId)) {
119  $data = $this->raw(self::FIELD_TYPE_ID);
120  if (is_null($data)) {
121  return null;
122  }
123  $this->typeId = (string) $data;
124  }
125 
126  return $this->typeId;
127  }
128 
135  public function getId()
136  {
137  if (is_null($this->id)) {
139  $data = $this->raw(self::FIELD_ID);
140  if (is_null($data)) {
141  return null;
142  }
143  $this->id = (string) $data;
144  }
145 
146  return $this->id;
147  }
148 
155  public function getKey()
156  {
157  if (is_null($this->key)) {
159  $data = $this->raw(self::FIELD_KEY);
160  if (is_null($data)) {
161  return null;
162  }
163  $this->key = (string) $data;
164  }
165 
166  return $this->key;
167  }
168 
169 
173  public function setMessage(?string $message): void
174  {
175  $this->message = $message;
176  }
177 
181  public function setTypeId(?string $typeId): void
182  {
183  $this->typeId = $typeId;
184  }
185 
189  public function setId(?string $id): void
190  {
191  $this->id = $id;
192  }
193 
197  public function setKey(?string $key): void
198  {
199  $this->key = $key;
200  }
201 }
__construct(?string $message=null, ?string $typeId=null, ?string $id=null, ?string $key=null, ?string $code=null)