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

For a custom routing accelerator, sets the port range and protocol for all * endpoints (virtual private cloud subnets) in an endpoint group to accept client * traffic on.

See Also:

AWS * API Reference

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

The first port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline int GetFromPort() const{ return m_fromPort; } /** *

The first port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; } /** *

The first port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; } /** *

The first port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline CustomRoutingDestinationConfiguration& WithFromPort(int value) { SetFromPort(value); return *this;} /** *

The last port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline int GetToPort() const{ return m_toPort; } /** *

The last port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; } /** *

The last port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; } /** *

The last port, inclusive, in the range of ports for the endpoint group that * is associated with a custom routing accelerator.

*/ inline CustomRoutingDestinationConfiguration& WithToPort(int value) { SetToPort(value); return *this;} /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline const Aws::Vector& GetProtocols() const{ return m_protocols; } /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; } /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline void SetProtocols(const Aws::Vector& value) { m_protocolsHasBeenSet = true; m_protocols = value; } /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline void SetProtocols(Aws::Vector&& value) { m_protocolsHasBeenSet = true; m_protocols = std::move(value); } /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline CustomRoutingDestinationConfiguration& WithProtocols(const Aws::Vector& value) { SetProtocols(value); return *this;} /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline CustomRoutingDestinationConfiguration& WithProtocols(Aws::Vector&& value) { SetProtocols(std::move(value)); return *this;} /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline CustomRoutingDestinationConfiguration& AddProtocols(const CustomRoutingProtocol& value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; } /** *

The protocol for the endpoint group that is associated with a custom routing * accelerator. The protocol can be either TCP or UDP.

*/ inline CustomRoutingDestinationConfiguration& AddProtocols(CustomRoutingProtocol&& value) { m_protocolsHasBeenSet = true; m_protocols.push_back(std::move(value)); return *this; } private: int m_fromPort; bool m_fromPortHasBeenSet = false; int m_toPort; bool m_toPortHasBeenSet = false; Aws::Vector m_protocols; bool m_protocolsHasBeenSet = false; }; } // namespace Model } // namespace GlobalAccelerator } // namespace Aws