class ResumeOrchestrationRequest {

    protected String getInstanceName(InfraActiveRequests infraActiveRequest, String requestScope,
            InfraActiveRequests currentActiveRequest) throws ValidateException, RequestDbFailureException {
        ModelType type;
        String instanceName = "";
        try {
            type = ModelType.valueOf(requestScope);
            instanceName = type.getName(infraActiveRequest);
        } catch (IllegalArgumentException e) {
            logger.error("requestScope \"{}\" does not match a ModelType enum.", requestScope);
            ValidateException validateException = new ValidateException.Builder(
                    "requestScope: \"" + requestScope + "\" from request: " + infraActiveRequest.getRequestId()
                            + " does not match a ModelType enum.",
                    HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e).build();
            requestHandlerUtils.updateStatus(currentActiveRequest, Status.FAILED, validateException.getMessage());
            throw validateException;
        }
        return instanceName;
    }

}