110 lines
2.2 KiB
C++
110 lines
2.2 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/fsx/model/DataRepositoryTaskStatus.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace FSx
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataRepositoryTaskStatus::DataRepositoryTaskStatus() :
|
|||
|
|
m_totalCount(0),
|
|||
|
|
m_totalCountHasBeenSet(false),
|
|||
|
|
m_succeededCount(0),
|
|||
|
|
m_succeededCountHasBeenSet(false),
|
|||
|
|
m_failedCount(0),
|
|||
|
|
m_failedCountHasBeenSet(false),
|
|||
|
|
m_lastUpdatedTimeHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DataRepositoryTaskStatus::DataRepositoryTaskStatus(JsonView jsonValue) :
|
|||
|
|
m_totalCount(0),
|
|||
|
|
m_totalCountHasBeenSet(false),
|
|||
|
|
m_succeededCount(0),
|
|||
|
|
m_succeededCountHasBeenSet(false),
|
|||
|
|
m_failedCount(0),
|
|||
|
|
m_failedCountHasBeenSet(false),
|
|||
|
|
m_lastUpdatedTimeHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DataRepositoryTaskStatus& DataRepositoryTaskStatus::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("TotalCount"))
|
|||
|
|
{
|
|||
|
|
m_totalCount = jsonValue.GetInt64("TotalCount");
|
|||
|
|
|
|||
|
|
m_totalCountHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("SucceededCount"))
|
|||
|
|
{
|
|||
|
|
m_succeededCount = jsonValue.GetInt64("SucceededCount");
|
|||
|
|
|
|||
|
|
m_succeededCountHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("FailedCount"))
|
|||
|
|
{
|
|||
|
|
m_failedCount = jsonValue.GetInt64("FailedCount");
|
|||
|
|
|
|||
|
|
m_failedCountHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("LastUpdatedTime"))
|
|||
|
|
{
|
|||
|
|
m_lastUpdatedTime = jsonValue.GetDouble("LastUpdatedTime");
|
|||
|
|
|
|||
|
|
m_lastUpdatedTimeHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue DataRepositoryTaskStatus::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_totalCountHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithInt64("TotalCount", m_totalCount);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_succeededCountHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithInt64("SucceededCount", m_succeededCount);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_failedCountHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithInt64("FailedCount", m_failedCount);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_lastUpdatedTimeHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithDouble("LastUpdatedTime", m_lastUpdatedTime.SecondsWithMSPrecision());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace FSx
|
|||
|
|
} // namespace Aws
|