public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }