179 lines
3.7 KiB
C++
179 lines
3.7 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/ssm/model/AssociationExecutionTarget.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
|
|
{
|
|
|
|
AssociationExecutionTarget::AssociationExecutionTarget() :
|
|
m_associationIdHasBeenSet(false),
|
|
m_associationVersionHasBeenSet(false),
|
|
m_executionIdHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false),
|
|
m_resourceTypeHasBeenSet(false),
|
|
m_statusHasBeenSet(false),
|
|
m_detailedStatusHasBeenSet(false),
|
|
m_lastExecutionDateHasBeenSet(false),
|
|
m_outputSourceHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
AssociationExecutionTarget::AssociationExecutionTarget(JsonView jsonValue) :
|
|
m_associationIdHasBeenSet(false),
|
|
m_associationVersionHasBeenSet(false),
|
|
m_executionIdHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false),
|
|
m_resourceTypeHasBeenSet(false),
|
|
m_statusHasBeenSet(false),
|
|
m_detailedStatusHasBeenSet(false),
|
|
m_lastExecutionDateHasBeenSet(false),
|
|
m_outputSourceHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
AssociationExecutionTarget& AssociationExecutionTarget::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("AssociationId"))
|
|
{
|
|
m_associationId = jsonValue.GetString("AssociationId");
|
|
|
|
m_associationIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("AssociationVersion"))
|
|
{
|
|
m_associationVersion = jsonValue.GetString("AssociationVersion");
|
|
|
|
m_associationVersionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("ExecutionId"))
|
|
{
|
|
m_executionId = jsonValue.GetString("ExecutionId");
|
|
|
|
m_executionIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("ResourceId"))
|
|
{
|
|
m_resourceId = jsonValue.GetString("ResourceId");
|
|
|
|
m_resourceIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("ResourceType"))
|
|
{
|
|
m_resourceType = jsonValue.GetString("ResourceType");
|
|
|
|
m_resourceTypeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Status"))
|
|
{
|
|
m_status = jsonValue.GetString("Status");
|
|
|
|
m_statusHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DetailedStatus"))
|
|
{
|
|
m_detailedStatus = jsonValue.GetString("DetailedStatus");
|
|
|
|
m_detailedStatusHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("LastExecutionDate"))
|
|
{
|
|
m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate");
|
|
|
|
m_lastExecutionDateHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("OutputSource"))
|
|
{
|
|
m_outputSource = jsonValue.GetObject("OutputSource");
|
|
|
|
m_outputSourceHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue AssociationExecutionTarget::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_associationIdHasBeenSet)
|
|
{
|
|
payload.WithString("AssociationId", m_associationId);
|
|
|
|
}
|
|
|
|
if(m_associationVersionHasBeenSet)
|
|
{
|
|
payload.WithString("AssociationVersion", m_associationVersion);
|
|
|
|
}
|
|
|
|
if(m_executionIdHasBeenSet)
|
|
{
|
|
payload.WithString("ExecutionId", m_executionId);
|
|
|
|
}
|
|
|
|
if(m_resourceIdHasBeenSet)
|
|
{
|
|
payload.WithString("ResourceId", m_resourceId);
|
|
|
|
}
|
|
|
|
if(m_resourceTypeHasBeenSet)
|
|
{
|
|
payload.WithString("ResourceType", m_resourceType);
|
|
|
|
}
|
|
|
|
if(m_statusHasBeenSet)
|
|
{
|
|
payload.WithString("Status", m_status);
|
|
|
|
}
|
|
|
|
if(m_detailedStatusHasBeenSet)
|
|
{
|
|
payload.WithString("DetailedStatus", m_detailedStatus);
|
|
|
|
}
|
|
|
|
if(m_lastExecutionDateHasBeenSet)
|
|
{
|
|
payload.WithDouble("LastExecutionDate", m_lastExecutionDate.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_outputSourceHasBeenSet)
|
|
{
|
|
payload.WithObject("OutputSource", m_outputSource.Jsonize());
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace SSM
|
|
} // namespace Aws
|