/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace GlobalAccelerator { namespace Model { /** *

An IP address/port combination.

See Also:

AWS * API Reference

*/ class SocketAddress { public: AWS_GLOBALACCELERATOR_API SocketAddress(); AWS_GLOBALACCELERATOR_API SocketAddress(Aws::Utils::Json::JsonView jsonValue); AWS_GLOBALACCELERATOR_API SocketAddress& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GLOBALACCELERATOR_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The IP address for the socket address.

*/ inline const Aws::String& GetIpAddress() const{ return m_ipAddress; } /** *

The IP address for the socket address.

*/ inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; } /** *

The IP address for the socket address.

*/ inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; } /** *

The IP address for the socket address.

*/ inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = std::move(value); } /** *

The IP address for the socket address.

*/ inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); } /** *

The IP address for the socket address.

*/ inline SocketAddress& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;} /** *

The IP address for the socket address.

*/ inline SocketAddress& WithIpAddress(Aws::String&& value) { SetIpAddress(std::move(value)); return *this;} /** *

The IP address for the socket address.

*/ inline SocketAddress& WithIpAddress(const char* value) { SetIpAddress(value); return *this;} /** *

The port for the socket address.

*/ inline int GetPort() const{ return m_port; } /** *

The port for the socket address.

*/ inline bool PortHasBeenSet() const { return m_portHasBeenSet; } /** *

The port for the socket address.

*/ inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } /** *

The port for the socket address.

*/ inline SocketAddress& WithPort(int value) { SetPort(value); return *this;} private: Aws::String m_ipAddress; bool m_ipAddressHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; }; } // namespace Model } // namespace GlobalAccelerator } // namespace Aws