'Return a Backend Service object from the JSON-response dictionary.
:param  backendservice: The dictionary describing the backend service.
:type   backendservice: ``dict``
:return: BackendService object
:rtype: :class:`GCEBackendService`'

def _to_backendservice(self, backendservice):

    extra = {}
    for extra_key in ('selfLink', 'creationTimestamp', 'fingerprint', 'description'):
        extra[extra_key] = backendservice.get(extra_key)
    backends = backendservice.get('backends', [])
    healthchecks = [self._get_object_by_kind(h) for h in backendservice.get('healthChecks', [])]
    return GCEBackendService(id=backendservice['id'], name=backendservice['name'], backends=backends, healthchecks=healthchecks, port=backendservice['port'], port_name=backendservice['portName'], protocol=backendservice['protocol'], timeout=backendservice['timeoutSec'], driver=self, extra=extra)
