in php/src/Models/SuggestionResponse.php [44:73]
public function toMap()
{
$res = [];
if (null !== $this->requestId) {
$res['request_id'] = $this->requestId;
}
if (null !== $this->searchtime) {
$res['searchtime'] = $this->searchtime;
}
if (null !== $this->suggestions) {
$res['suggestions'] = [];
if (null !== $this->suggestions && \is_array($this->suggestions)) {
$n = 0;
foreach ($this->suggestions as $item) {
$res['suggestions'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
if (null !== $this->errors) {
$res['errors'] = [];
if (null !== $this->errors && \is_array($this->errors)) {
$n = 0;
foreach ($this->errors as $item) {
$res['errors'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
return $res;
}