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

A port mapping for the container.

See Also:

AWS * API Reference

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

The port number on the container that is bound to the user-specified or * automatically assigned host port.

*/ inline int GetContainerPort() const{ return m_containerPort; } /** *

The port number on the container that is bound to the user-specified or * automatically assigned host port.

*/ inline bool ContainerPortHasBeenSet() const { return m_containerPortHasBeenSet; } /** *

The port number on the container that is bound to the user-specified or * automatically assigned host port.

*/ inline void SetContainerPort(int value) { m_containerPortHasBeenSet = true; m_containerPort = value; } /** *

The port number on the container that is bound to the user-specified or * automatically assigned host port.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails& WithContainerPort(int value) { SetContainerPort(value); return *this;} /** *

The port number on the container instance to reserve for the container.

*/ inline int GetHostPort() const{ return m_hostPort; } /** *

The port number on the container instance to reserve for the container.

*/ inline bool HostPortHasBeenSet() const { return m_hostPortHasBeenSet; } /** *

The port number on the container instance to reserve for the container.

*/ inline void SetHostPort(int value) { m_hostPortHasBeenSet = true; m_hostPort = value; } /** *

The port number on the container instance to reserve for the container.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails& WithHostPort(int value) { SetHostPort(value); return *this;} /** *

The protocol used for the port mapping. The default is tcp.

*/ inline const Aws::String& GetProtocol() const{ return m_protocol; } /** *

The protocol used for the port mapping. The default is tcp.

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The protocol used for the port mapping. The default is tcp.

*/ inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The protocol used for the port mapping. The default is tcp.

*/ inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The protocol used for the port mapping. The default is tcp.

*/ inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); } /** *

The protocol used for the port mapping. The default is tcp.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;} /** *

The protocol used for the port mapping. The default is tcp.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;} /** *

The protocol used for the port mapping. The default is tcp.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails& WithProtocol(const char* value) { SetProtocol(value); return *this;} private: int m_containerPort; bool m_containerPortHasBeenSet = false; int m_hostPort; bool m_hostPortHasBeenSet = false; Aws::String m_protocol; bool m_protocolHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws