197 lines
5.1 KiB
C++
197 lines
5.1 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/transcribe/model/MedicalTranscriptionJobSummary.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace TranscribeService
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
MedicalTranscriptionJobSummary::MedicalTranscriptionJobSummary() :
|
|
m_medicalTranscriptionJobNameHasBeenSet(false),
|
|
m_creationTimeHasBeenSet(false),
|
|
m_startTimeHasBeenSet(false),
|
|
m_completionTimeHasBeenSet(false),
|
|
m_languageCode(LanguageCode::NOT_SET),
|
|
m_languageCodeHasBeenSet(false),
|
|
m_transcriptionJobStatus(TranscriptionJobStatus::NOT_SET),
|
|
m_transcriptionJobStatusHasBeenSet(false),
|
|
m_failureReasonHasBeenSet(false),
|
|
m_outputLocationType(OutputLocationType::NOT_SET),
|
|
m_outputLocationTypeHasBeenSet(false),
|
|
m_specialty(Specialty::NOT_SET),
|
|
m_specialtyHasBeenSet(false),
|
|
m_type(Type::NOT_SET),
|
|
m_typeHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
MedicalTranscriptionJobSummary::MedicalTranscriptionJobSummary(JsonView jsonValue) :
|
|
m_medicalTranscriptionJobNameHasBeenSet(false),
|
|
m_creationTimeHasBeenSet(false),
|
|
m_startTimeHasBeenSet(false),
|
|
m_completionTimeHasBeenSet(false),
|
|
m_languageCode(LanguageCode::NOT_SET),
|
|
m_languageCodeHasBeenSet(false),
|
|
m_transcriptionJobStatus(TranscriptionJobStatus::NOT_SET),
|
|
m_transcriptionJobStatusHasBeenSet(false),
|
|
m_failureReasonHasBeenSet(false),
|
|
m_outputLocationType(OutputLocationType::NOT_SET),
|
|
m_outputLocationTypeHasBeenSet(false),
|
|
m_specialty(Specialty::NOT_SET),
|
|
m_specialtyHasBeenSet(false),
|
|
m_type(Type::NOT_SET),
|
|
m_typeHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
MedicalTranscriptionJobSummary& MedicalTranscriptionJobSummary::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("MedicalTranscriptionJobName"))
|
|
{
|
|
m_medicalTranscriptionJobName = jsonValue.GetString("MedicalTranscriptionJobName");
|
|
|
|
m_medicalTranscriptionJobNameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("CreationTime"))
|
|
{
|
|
m_creationTime = jsonValue.GetDouble("CreationTime");
|
|
|
|
m_creationTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("StartTime"))
|
|
{
|
|
m_startTime = jsonValue.GetDouble("StartTime");
|
|
|
|
m_startTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("CompletionTime"))
|
|
{
|
|
m_completionTime = jsonValue.GetDouble("CompletionTime");
|
|
|
|
m_completionTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("LanguageCode"))
|
|
{
|
|
m_languageCode = LanguageCodeMapper::GetLanguageCodeForName(jsonValue.GetString("LanguageCode"));
|
|
|
|
m_languageCodeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("TranscriptionJobStatus"))
|
|
{
|
|
m_transcriptionJobStatus = TranscriptionJobStatusMapper::GetTranscriptionJobStatusForName(jsonValue.GetString("TranscriptionJobStatus"));
|
|
|
|
m_transcriptionJobStatusHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("FailureReason"))
|
|
{
|
|
m_failureReason = jsonValue.GetString("FailureReason");
|
|
|
|
m_failureReasonHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("OutputLocationType"))
|
|
{
|
|
m_outputLocationType = OutputLocationTypeMapper::GetOutputLocationTypeForName(jsonValue.GetString("OutputLocationType"));
|
|
|
|
m_outputLocationTypeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Specialty"))
|
|
{
|
|
m_specialty = SpecialtyMapper::GetSpecialtyForName(jsonValue.GetString("Specialty"));
|
|
|
|
m_specialtyHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Type"))
|
|
{
|
|
m_type = TypeMapper::GetTypeForName(jsonValue.GetString("Type"));
|
|
|
|
m_typeHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue MedicalTranscriptionJobSummary::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_medicalTranscriptionJobNameHasBeenSet)
|
|
{
|
|
payload.WithString("MedicalTranscriptionJobName", m_medicalTranscriptionJobName);
|
|
|
|
}
|
|
|
|
if(m_creationTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_startTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("StartTime", m_startTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_completionTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("CompletionTime", m_completionTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_languageCodeHasBeenSet)
|
|
{
|
|
payload.WithString("LanguageCode", LanguageCodeMapper::GetNameForLanguageCode(m_languageCode));
|
|
}
|
|
|
|
if(m_transcriptionJobStatusHasBeenSet)
|
|
{
|
|
payload.WithString("TranscriptionJobStatus", TranscriptionJobStatusMapper::GetNameForTranscriptionJobStatus(m_transcriptionJobStatus));
|
|
}
|
|
|
|
if(m_failureReasonHasBeenSet)
|
|
{
|
|
payload.WithString("FailureReason", m_failureReason);
|
|
|
|
}
|
|
|
|
if(m_outputLocationTypeHasBeenSet)
|
|
{
|
|
payload.WithString("OutputLocationType", OutputLocationTypeMapper::GetNameForOutputLocationType(m_outputLocationType));
|
|
}
|
|
|
|
if(m_specialtyHasBeenSet)
|
|
{
|
|
payload.WithString("Specialty", SpecialtyMapper::GetNameForSpecialty(m_specialty));
|
|
}
|
|
|
|
if(m_typeHasBeenSet)
|
|
{
|
|
payload.WithString("Type", TypeMapper::GetNameForType(m_type));
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace TranscribeService
|
|
} // namespace Aws
|