src/Discovery/Repository/ServiceRepository.php
protected function toModel(stdClass $object)
    {
        $class = $this->getClassName();
        $model = new $class;
        $model
            ->setId($object->ServiceID)
            ->setIp($object->ServiceAddress)
            ->setPort($object->ServicePort)
            ->setMeta((array) $object->ServiceMeta)
            ->setTags($object->ServiceTags);

        return $model;
    }
protected function toModel(stdClass $object)
    {
        $class = $this->getClassName();
        $model = new $class;
        $model
            ->setId($object->ServiceID)
            ->setIp($object->ServiceAddress)
            ->setPort($object->ServicePort)
            ->setMeta((array) $object->ServiceMeta)
            ->setTags($object->ServiceTags);

        return $model;
    }
Type cast object to model

@param \stdClass $object
@return \Ds\Component\Discovery\Model\Service