This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-codeguruprofiler/source/model/AnomalyInstance.cpp

103 lines
1.9 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeguruprofiler/model/AnomalyInstance.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeGuruProfiler
{
namespace Model
{
AnomalyInstance::AnomalyInstance() :
m_endTimeHasBeenSet(false),
m_idHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_userFeedbackHasBeenSet(false)
{
}
AnomalyInstance::AnomalyInstance(JsonView jsonValue) :
m_endTimeHasBeenSet(false),
m_idHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_userFeedbackHasBeenSet(false)
{
*this = jsonValue;
}
AnomalyInstance& AnomalyInstance::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("endTime"))
{
m_endTime = jsonValue.GetString("endTime");
m_endTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("startTime"))
{
m_startTime = jsonValue.GetString("startTime");
m_startTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("userFeedback"))
{
m_userFeedback = jsonValue.GetObject("userFeedback");
m_userFeedbackHasBeenSet = true;
}
return *this;
}
JsonValue AnomalyInstance::Jsonize() const
{
JsonValue payload;
if(m_endTimeHasBeenSet)
{
payload.WithString("endTime", m_endTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_startTimeHasBeenSet)
{
payload.WithString("startTime", m_startTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_userFeedbackHasBeenSet)
{
payload.WithObject("userFeedback", m_userFeedback.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace CodeGuruProfiler
} // namespace Aws