/** * 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 GlobalAccelerator { namespace Model { SocketAddress::SocketAddress() : m_ipAddressHasBeenSet(false), m_port(0), m_portHasBeenSet(false) { } SocketAddress::SocketAddress(JsonView jsonValue) : m_ipAddressHasBeenSet(false), m_port(0), m_portHasBeenSet(false) { *this = jsonValue; } SocketAddress& SocketAddress::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("IpAddress")) { m_ipAddress = jsonValue.GetString("IpAddress"); m_ipAddressHasBeenSet = true; } if(jsonValue.ValueExists("Port")) { m_port = jsonValue.GetInteger("Port"); m_portHasBeenSet = true; } return *this; } JsonValue SocketAddress::Jsonize() const { JsonValue payload; if(m_ipAddressHasBeenSet) { payload.WithString("IpAddress", m_ipAddress); } if(m_portHasBeenSet) { payload.WithInteger("Port", m_port); } return payload; } } // namespace Model } // namespace GlobalAccelerator } // namespace Aws