class AWSTranscribeService implements TranscribeService, AcmConfigurablePlugin {

    @Override
    public Transcribe get(String remoteId) throws GetTranscribeException
    {
        if (StringUtils.isNotEmpty(remoteId))
        {
            try
            {
                GetTranscriptionJobRequest request = new GetTranscriptionJobRequest();
                request.setTranscriptionJobName(remoteId);

                GetTranscriptionJobResult result = getTranscribeClient().getTranscriptionJob(request);
                String resultStatus = result.getTranscriptionJob().getTranscriptionJobStatus();

                Transcribe transcribe = new Transcribe();
                if (TranscriptionJobStatus.COMPLETED.toString().equals(resultStatus))
                {
                    transcribe.setTranscribeItems(generateTranscribeItems(result));
                    transcribe.setStatus(TranscribeStatusType.COMPLETED.toString());
                    transcribe.setRemoteId(remoteId);
                }
                else
                {
                    String status = TranscribeStatusType.PROCESSING.toString();
                    switch (TranscriptionJobStatus.fromValue(resultStatus))
                    {
                    case IN_PROGRESS:
                        status = TranscribeStatusType.PROCESSING.toString();
                        break;
                    case FAILED:
                        status = TranscribeStatusType.FAILED.toString();
                        break;
                    }
                    transcribe.setStatus(status);
                    transcribe.setRemoteId(remoteId);
                }

                return transcribe;
            }
            catch (MuleException | AmazonServiceException e)
            {
                throw new GetTranscribeException(String.format("Unable to get transcribe job on Amazon. REASON=[%s].", e.getMessage()), e);
            }
        }

        throw new GetTranscribeException("Unable to get transcribe job on Amazon. Remote ID not provided.");
    }

}