def METHOD_NAME(self):
    from corehq.motech.generic_inbound.backend.json import JsonBackend
    from corehq.motech.generic_inbound.backend.hl7 import Hl7Backend
    if self.backend == ApiBackendOptions.json:
        return JsonBackend
    elif self.backend == ApiBackendOptions.hl7:
        return Hl7Backend
    raise GenericInboundApiError(f"Unknown backend type: {self.backend}")