/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include 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