224 lines
4.8 KiB
C++
224 lines
4.8 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/comprehend/model/DocumentClassificationJobProperties.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Comprehend
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
DocumentClassificationJobProperties::DocumentClassificationJobProperties() :
|
|
m_jobIdHasBeenSet(false),
|
|
m_jobNameHasBeenSet(false),
|
|
m_jobStatus(JobStatus::NOT_SET),
|
|
m_jobStatusHasBeenSet(false),
|
|
m_messageHasBeenSet(false),
|
|
m_submitTimeHasBeenSet(false),
|
|
m_endTimeHasBeenSet(false),
|
|
m_documentClassifierArnHasBeenSet(false),
|
|
m_inputDataConfigHasBeenSet(false),
|
|
m_outputDataConfigHasBeenSet(false),
|
|
m_dataAccessRoleArnHasBeenSet(false),
|
|
m_volumeKmsKeyIdHasBeenSet(false),
|
|
m_vpcConfigHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
DocumentClassificationJobProperties::DocumentClassificationJobProperties(JsonView jsonValue) :
|
|
m_jobIdHasBeenSet(false),
|
|
m_jobNameHasBeenSet(false),
|
|
m_jobStatus(JobStatus::NOT_SET),
|
|
m_jobStatusHasBeenSet(false),
|
|
m_messageHasBeenSet(false),
|
|
m_submitTimeHasBeenSet(false),
|
|
m_endTimeHasBeenSet(false),
|
|
m_documentClassifierArnHasBeenSet(false),
|
|
m_inputDataConfigHasBeenSet(false),
|
|
m_outputDataConfigHasBeenSet(false),
|
|
m_dataAccessRoleArnHasBeenSet(false),
|
|
m_volumeKmsKeyIdHasBeenSet(false),
|
|
m_vpcConfigHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
DocumentClassificationJobProperties& DocumentClassificationJobProperties::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("JobId"))
|
|
{
|
|
m_jobId = jsonValue.GetString("JobId");
|
|
|
|
m_jobIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("JobName"))
|
|
{
|
|
m_jobName = jsonValue.GetString("JobName");
|
|
|
|
m_jobNameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("JobStatus"))
|
|
{
|
|
m_jobStatus = JobStatusMapper::GetJobStatusForName(jsonValue.GetString("JobStatus"));
|
|
|
|
m_jobStatusHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Message"))
|
|
{
|
|
m_message = jsonValue.GetString("Message");
|
|
|
|
m_messageHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("SubmitTime"))
|
|
{
|
|
m_submitTime = jsonValue.GetDouble("SubmitTime");
|
|
|
|
m_submitTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("EndTime"))
|
|
{
|
|
m_endTime = jsonValue.GetDouble("EndTime");
|
|
|
|
m_endTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DocumentClassifierArn"))
|
|
{
|
|
m_documentClassifierArn = jsonValue.GetString("DocumentClassifierArn");
|
|
|
|
m_documentClassifierArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("InputDataConfig"))
|
|
{
|
|
m_inputDataConfig = jsonValue.GetObject("InputDataConfig");
|
|
|
|
m_inputDataConfigHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("OutputDataConfig"))
|
|
{
|
|
m_outputDataConfig = jsonValue.GetObject("OutputDataConfig");
|
|
|
|
m_outputDataConfigHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DataAccessRoleArn"))
|
|
{
|
|
m_dataAccessRoleArn = jsonValue.GetString("DataAccessRoleArn");
|
|
|
|
m_dataAccessRoleArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("VolumeKmsKeyId"))
|
|
{
|
|
m_volumeKmsKeyId = jsonValue.GetString("VolumeKmsKeyId");
|
|
|
|
m_volumeKmsKeyIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("VpcConfig"))
|
|
{
|
|
m_vpcConfig = jsonValue.GetObject("VpcConfig");
|
|
|
|
m_vpcConfigHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue DocumentClassificationJobProperties::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_jobIdHasBeenSet)
|
|
{
|
|
payload.WithString("JobId", m_jobId);
|
|
|
|
}
|
|
|
|
if(m_jobNameHasBeenSet)
|
|
{
|
|
payload.WithString("JobName", m_jobName);
|
|
|
|
}
|
|
|
|
if(m_jobStatusHasBeenSet)
|
|
{
|
|
payload.WithString("JobStatus", JobStatusMapper::GetNameForJobStatus(m_jobStatus));
|
|
}
|
|
|
|
if(m_messageHasBeenSet)
|
|
{
|
|
payload.WithString("Message", m_message);
|
|
|
|
}
|
|
|
|
if(m_submitTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("SubmitTime", m_submitTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_endTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("EndTime", m_endTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_documentClassifierArnHasBeenSet)
|
|
{
|
|
payload.WithString("DocumentClassifierArn", m_documentClassifierArn);
|
|
|
|
}
|
|
|
|
if(m_inputDataConfigHasBeenSet)
|
|
{
|
|
payload.WithObject("InputDataConfig", m_inputDataConfig.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_outputDataConfigHasBeenSet)
|
|
{
|
|
payload.WithObject("OutputDataConfig", m_outputDataConfig.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_dataAccessRoleArnHasBeenSet)
|
|
{
|
|
payload.WithString("DataAccessRoleArn", m_dataAccessRoleArn);
|
|
|
|
}
|
|
|
|
if(m_volumeKmsKeyIdHasBeenSet)
|
|
{
|
|
payload.WithString("VolumeKmsKeyId", m_volumeKmsKeyId);
|
|
|
|
}
|
|
|
|
if(m_vpcConfigHasBeenSet)
|
|
{
|
|
payload.WithObject("VpcConfig", m_vpcConfig.Jsonize());
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Comprehend
|
|
} // namespace Aws
|