/** * 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 ECS { namespace Model { /** *

Hostnames and IP address entries that are added to the * /etc/hosts file of a container via the extraHosts * parameter of its ContainerDefinition.

See Also:

AWS API * Reference

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

The hostname to use in the /etc/hosts entry.

*/ inline const Aws::String& GetHostname() const{ return m_hostname; } /** *

The hostname to use in the /etc/hosts entry.

*/ inline bool HostnameHasBeenSet() const { return m_hostnameHasBeenSet; } /** *

The hostname to use in the /etc/hosts entry.

*/ inline void SetHostname(const Aws::String& value) { m_hostnameHasBeenSet = true; m_hostname = value; } /** *

The hostname to use in the /etc/hosts entry.

*/ inline void SetHostname(Aws::String&& value) { m_hostnameHasBeenSet = true; m_hostname = std::move(value); } /** *

The hostname to use in the /etc/hosts entry.

*/ inline void SetHostname(const char* value) { m_hostnameHasBeenSet = true; m_hostname.assign(value); } /** *

The hostname to use in the /etc/hosts entry.

*/ inline HostEntry& WithHostname(const Aws::String& value) { SetHostname(value); return *this;} /** *

The hostname to use in the /etc/hosts entry.

*/ inline HostEntry& WithHostname(Aws::String&& value) { SetHostname(std::move(value)); return *this;} /** *

The hostname to use in the /etc/hosts entry.

*/ inline HostEntry& WithHostname(const char* value) { SetHostname(value); return *this;} /** *

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

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

The IP address to use in the /etc/hosts entry.

*/ inline HostEntry& WithIpAddress(const char* value) { SetIpAddress(value); return *this;} private: Aws::String m_hostname; bool m_hostnameHasBeenSet = false; Aws::String m_ipAddress; bool m_ipAddressHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws