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-ssm/source/model/MaintenanceWindowExecution.cpp

134 lines
2.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/ssm/model/MaintenanceWindowExecution.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
MaintenanceWindowExecution::MaintenanceWindowExecution() :
m_windowIdHasBeenSet(false),
m_windowExecutionIdHasBeenSet(false),
m_status(MaintenanceWindowExecutionStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false)
{
}
MaintenanceWindowExecution::MaintenanceWindowExecution(JsonView jsonValue) :
m_windowIdHasBeenSet(false),
m_windowExecutionIdHasBeenSet(false),
m_status(MaintenanceWindowExecutionStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false)
{
*this = jsonValue;
}
MaintenanceWindowExecution& MaintenanceWindowExecution::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("WindowId"))
{
m_windowId = jsonValue.GetString("WindowId");
m_windowIdHasBeenSet = true;
}
if(jsonValue.ValueExists("WindowExecutionId"))
{
m_windowExecutionId = jsonValue.GetString("WindowExecutionId");
m_windowExecutionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = MaintenanceWindowExecutionStatusMapper::GetMaintenanceWindowExecutionStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusDetails"))
{
m_statusDetails = jsonValue.GetString("StatusDetails");
m_statusDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("StartTime"))
{
m_startTime = jsonValue.GetDouble("StartTime");
m_startTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("EndTime"))
{
m_endTime = jsonValue.GetDouble("EndTime");
m_endTimeHasBeenSet = true;
}
return *this;
}
JsonValue MaintenanceWindowExecution::Jsonize() const
{
JsonValue payload;
if(m_windowIdHasBeenSet)
{
payload.WithString("WindowId", m_windowId);
}
if(m_windowExecutionIdHasBeenSet)
{
payload.WithString("WindowExecutionId", m_windowExecutionId);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", MaintenanceWindowExecutionStatusMapper::GetNameForMaintenanceWindowExecutionStatus(m_status));
}
if(m_statusDetailsHasBeenSet)
{
payload.WithString("StatusDetails", m_statusDetails);
}
if(m_startTimeHasBeenSet)
{
payload.WithDouble("StartTime", m_startTime.SecondsWithMSPrecision());
}
if(m_endTimeHasBeenSet)
{
payload.WithDouble("EndTime", m_endTime.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws