148 lines
3.0 KiB
C++
148 lines
3.0 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/forecast/model/PredictorSummary.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace ForecastService
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
PredictorSummary::PredictorSummary() :
|
|
m_predictorArnHasBeenSet(false),
|
|
m_predictorNameHasBeenSet(false),
|
|
m_datasetGroupArnHasBeenSet(false),
|
|
m_statusHasBeenSet(false),
|
|
m_messageHasBeenSet(false),
|
|
m_creationTimeHasBeenSet(false),
|
|
m_lastModificationTimeHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
PredictorSummary::PredictorSummary(JsonView jsonValue) :
|
|
m_predictorArnHasBeenSet(false),
|
|
m_predictorNameHasBeenSet(false),
|
|
m_datasetGroupArnHasBeenSet(false),
|
|
m_statusHasBeenSet(false),
|
|
m_messageHasBeenSet(false),
|
|
m_creationTimeHasBeenSet(false),
|
|
m_lastModificationTimeHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
PredictorSummary& PredictorSummary::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("PredictorArn"))
|
|
{
|
|
m_predictorArn = jsonValue.GetString("PredictorArn");
|
|
|
|
m_predictorArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("PredictorName"))
|
|
{
|
|
m_predictorName = jsonValue.GetString("PredictorName");
|
|
|
|
m_predictorNameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DatasetGroupArn"))
|
|
{
|
|
m_datasetGroupArn = jsonValue.GetString("DatasetGroupArn");
|
|
|
|
m_datasetGroupArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Status"))
|
|
{
|
|
m_status = jsonValue.GetString("Status");
|
|
|
|
m_statusHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Message"))
|
|
{
|
|
m_message = jsonValue.GetString("Message");
|
|
|
|
m_messageHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("CreationTime"))
|
|
{
|
|
m_creationTime = jsonValue.GetDouble("CreationTime");
|
|
|
|
m_creationTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("LastModificationTime"))
|
|
{
|
|
m_lastModificationTime = jsonValue.GetDouble("LastModificationTime");
|
|
|
|
m_lastModificationTimeHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue PredictorSummary::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_predictorArnHasBeenSet)
|
|
{
|
|
payload.WithString("PredictorArn", m_predictorArn);
|
|
|
|
}
|
|
|
|
if(m_predictorNameHasBeenSet)
|
|
{
|
|
payload.WithString("PredictorName", m_predictorName);
|
|
|
|
}
|
|
|
|
if(m_datasetGroupArnHasBeenSet)
|
|
{
|
|
payload.WithString("DatasetGroupArn", m_datasetGroupArn);
|
|
|
|
}
|
|
|
|
if(m_statusHasBeenSet)
|
|
{
|
|
payload.WithString("Status", m_status);
|
|
|
|
}
|
|
|
|
if(m_messageHasBeenSet)
|
|
{
|
|
payload.WithString("Message", m_message);
|
|
|
|
}
|
|
|
|
if(m_creationTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_lastModificationTimeHasBeenSet)
|
|
{
|
|
payload.WithDouble("LastModificationTime", m_lastModificationTime.SecondsWithMSPrecision());
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace ForecastService
|
|
} // namespace Aws
|