3declare(strict_types=1);
95 if (is_null($this->key)) {
97 $data = $this->
raw(self::FIELD_KEY);
101 $this->key = (string) $data;
115 if (is_null($this->resourceType)) {
117 $data = $this->
raw(self::FIELD_RESOURCE_TYPE);
118 if (is_null($data)) {
121 $this->resourceType = (string) $data;
135 if (is_null($this->version)) {
137 $data = $this->
raw(self::FIELD_VERSION);
138 if (is_null($data)) {
141 $this->version = (int) $data;
155 if (is_null($this->retentionPolicy)) {
157 $data = $this->
raw(self::FIELD_RETENTION_POLICY);
158 if (is_null($data)) {
162 $this->retentionPolicy = $className::of($data);
176 if (is_null($this->createdAt)) {
178 $data = $this->
raw(self::FIELD_CREATED_AT);
179 if (is_null($data)) {
182 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
183 if (
false === $data) {
186 $this->createdAt = $data;
200 if (is_null($this->lastModifiedAt)) {
202 $data = $this->
raw(self::FIELD_LAST_MODIFIED_AT);
203 if (is_null($data)) {
206 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
207 if (
false === $data) {
210 $this->lastModifiedAt = $data;
224 if (is_null($this->expiresAt)) {
226 $data = $this->
raw(self::FIELD_EXPIRES_AT);
227 if (is_null($data)) {
230 $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);
231 if (
false === $data) {
234 $this->expiresAt = $data;
298 #[\ReturnTypeWillChange]
313 return (
object) $data;