105 lines
2.1 KiB
C++
105 lines
2.1 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/sesv2/model/ImportJobSummary.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace SESV2
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
ImportJobSummary::ImportJobSummary() :
|
|||
|
|
m_jobIdHasBeenSet(false),
|
|||
|
|
m_importDestinationHasBeenSet(false),
|
|||
|
|
m_jobStatus(JobStatus::NOT_SET),
|
|||
|
|
m_jobStatusHasBeenSet(false),
|
|||
|
|
m_createdTimestampHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ImportJobSummary::ImportJobSummary(JsonView jsonValue) :
|
|||
|
|
m_jobIdHasBeenSet(false),
|
|||
|
|
m_importDestinationHasBeenSet(false),
|
|||
|
|
m_jobStatus(JobStatus::NOT_SET),
|
|||
|
|
m_jobStatusHasBeenSet(false),
|
|||
|
|
m_createdTimestampHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ImportJobSummary& ImportJobSummary::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("JobId"))
|
|||
|
|
{
|
|||
|
|
m_jobId = jsonValue.GetString("JobId");
|
|||
|
|
|
|||
|
|
m_jobIdHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("ImportDestination"))
|
|||
|
|
{
|
|||
|
|
m_importDestination = jsonValue.GetObject("ImportDestination");
|
|||
|
|
|
|||
|
|
m_importDestinationHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("JobStatus"))
|
|||
|
|
{
|
|||
|
|
m_jobStatus = JobStatusMapper::GetJobStatusForName(jsonValue.GetString("JobStatus"));
|
|||
|
|
|
|||
|
|
m_jobStatusHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("CreatedTimestamp"))
|
|||
|
|
{
|
|||
|
|
m_createdTimestamp = jsonValue.GetDouble("CreatedTimestamp");
|
|||
|
|
|
|||
|
|
m_createdTimestampHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue ImportJobSummary::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_jobIdHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("JobId", m_jobId);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_importDestinationHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("ImportDestination", m_importDestination.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_jobStatusHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("JobStatus", JobStatusMapper::GetNameForJobStatus(m_jobStatus));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_createdTimestampHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithDouble("CreatedTimestamp", m_createdTimestamp.SecondsWithMSPrecision());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace SESV2
|
|||
|
|
} // namespace Aws
|