type = $type; return $this; } /** * @return IndexType|null * @since 30.0.0 */ public function getType(): ?IndexType { return $this->type; } /** * @param array $data * * @return $this * @since 30.0.0 */ public function import(array $data): self { parent::import($data); $this->setType(IndexType::tryFrom($data['type'] ?? '')); return $this; } /** * @return array * @since 30.0.0 */ public function jsonSerialize(): array { return array_merge( parent::jsonSerialize(), [ 'type' => $this->getType() ?? '', ] ); } }