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-opsworks/source/model/ElasticIp.cpp

120 lines
1.9 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/opsworks/model/ElasticIp.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace OpsWorks
{
namespace Model
{
ElasticIp::ElasticIp() :
m_ipHasBeenSet(false),
m_nameHasBeenSet(false),
m_domainHasBeenSet(false),
m_regionHasBeenSet(false),
m_instanceIdHasBeenSet(false)
{
}
ElasticIp::ElasticIp(JsonView jsonValue) :
m_ipHasBeenSet(false),
m_nameHasBeenSet(false),
m_domainHasBeenSet(false),
m_regionHasBeenSet(false),
m_instanceIdHasBeenSet(false)
{
*this = jsonValue;
}
ElasticIp& ElasticIp::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Ip"))
{
m_ip = jsonValue.GetString("Ip");
m_ipHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Domain"))
{
m_domain = jsonValue.GetString("Domain");
m_domainHasBeenSet = true;
}
if(jsonValue.ValueExists("Region"))
{
m_region = jsonValue.GetString("Region");
m_regionHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceId"))
{
m_instanceId = jsonValue.GetString("InstanceId");
m_instanceIdHasBeenSet = true;
}
return *this;
}
JsonValue ElasticIp::Jsonize() const
{
JsonValue payload;
if(m_ipHasBeenSet)
{
payload.WithString("Ip", m_ip);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_domainHasBeenSet)
{
payload.WithString("Domain", m_domain);
}
if(m_regionHasBeenSet)
{
payload.WithString("Region", m_region);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
return payload;
}
} // namespace Model
} // namespace OpsWorks
} // namespace Aws