/**
  * Decodes host
  *
  * @param array $data
  *
  * @return Paysera_WalletApi_Entity_Client_Host
  */
 public function decodeHost(array $data)
 {
     $host = Paysera_WalletApi_Entity_Client_Host::create()->setHost($data['host']);
     if (!empty($data['path'])) {
         $host->setPath($data['path']);
     }
     if (!empty($data['port'])) {
         $host->setPort($data['port']);
     }
     if (!empty($data['protocol'])) {
         $host->setProtocol($data['protocol']);
     }
     if (!empty($data['any_port'])) {
         $host->markAsAnyPort();
     }
     if (!empty($data['any_subdomain'])) {
         $host->markAsAnySubdomain();
     }
     return $host;
 }