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/InstanceAssociation.cpp

105 lines
2.0 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/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