105 lines
2.0 KiB
C++
105 lines
2.0 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/ssm/model/InstanceAssociation.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
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
InstanceAssociation::InstanceAssociation() :
|
|||
|
|
m_associationIdHasBeenSet(false),
|
|||
|
|
m_instanceIdHasBeenSet(false),
|
|||
|
|
m_contentHasBeenSet(false),
|
|||
|
|
m_associationVersionHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
InstanceAssociation::InstanceAssociation(JsonView jsonValue) :
|
|||
|
|
m_associationIdHasBeenSet(false),
|
|||
|
|
m_instanceIdHasBeenSet(false),
|
|||
|
|
m_contentHasBeenSet(false),
|
|||
|
|
m_associationVersionHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
InstanceAssociation& InstanceAssociation::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("AssociationId"))
|
|||
|
|
{
|
|||
|
|
m_associationId = jsonValue.GetString("AssociationId");
|
|||
|
|
|
|||
|
|
m_associationIdHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("InstanceId"))
|
|||
|
|
{
|
|||
|
|
m_instanceId = jsonValue.GetString("InstanceId");
|
|||
|
|
|
|||
|
|
m_instanceIdHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("Content"))
|
|||
|
|
{
|
|||
|
|
m_content = jsonValue.GetString("Content");
|
|||
|
|
|
|||
|
|
m_contentHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("AssociationVersion"))
|
|||
|
|
{
|
|||
|
|
m_associationVersion = jsonValue.GetString("AssociationVersion");
|
|||
|
|
|
|||
|
|
m_associationVersionHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue InstanceAssociation::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_associationIdHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("AssociationId", m_associationId);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_instanceIdHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("InstanceId", m_instanceId);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_contentHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Content", m_content);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_associationVersionHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("AssociationVersion", m_associationVersion);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace SSM
|
|||
|
|
} // namespace Aws
|