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

A range of IP addresses and port settings that allow inbound traffic to * connect to server processes on an Amazon GameLift hosting resource. New game * sessions that are started on the fleet are assigned an IP address/port number * combination, which must fall into the fleet's allowed ranges. For fleets created * with a custom game server, the ranges reflect the server's game session * assignments. For Realtime Servers fleets, Amazon GameLift automatically opens * two port ranges, one for TCP messaging and one for UDP for use by the Realtime * servers.

See Also:

AWS * API Reference

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

A starting value for a range of allowed port numbers.

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

A starting value for a range of allowed port numbers.

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

A starting value for a range of allowed port numbers.

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

A starting value for a range of allowed port numbers.

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

An ending value for a range of allowed port numbers. Port numbers are * end-inclusive. This value must be higher than FromPort.

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

An ending value for a range of allowed port numbers. Port numbers are * end-inclusive. This value must be higher than FromPort.

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

An ending value for a range of allowed port numbers. Port numbers are * end-inclusive. This value must be higher than FromPort.

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

An ending value for a range of allowed port numbers. Port numbers are * end-inclusive. This value must be higher than FromPort.

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

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline const Aws::String& GetIpRange() const{ return m_ipRange; } /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline bool IpRangeHasBeenSet() const { return m_ipRangeHasBeenSet; } /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline void SetIpRange(const Aws::String& value) { m_ipRangeHasBeenSet = true; m_ipRange = value; } /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline void SetIpRange(Aws::String&& value) { m_ipRangeHasBeenSet = true; m_ipRange = std::move(value); } /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline void SetIpRange(const char* value) { m_ipRangeHasBeenSet = true; m_ipRange.assign(value); } /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline IpPermission& WithIpRange(const Aws::String& value) { SetIpRange(value); return *this;} /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline IpPermission& WithIpRange(Aws::String&& value) { SetIpRange(std::move(value)); return *this;} /** *

A range of allowed IP addresses. This value must be expressed in CIDR * notation. Example: "000.000.000.000/[subnet mask]" or optionally * the shortened version "0.0.0.0/[subnet mask]".

*/ inline IpPermission& WithIpRange(const char* value) { SetIpRange(value); return *this;} /** *

The network communication protocol used by the fleet.

*/ inline const IpProtocol& GetProtocol() const{ return m_protocol; } /** *

The network communication protocol used by the fleet.

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

The network communication protocol used by the fleet.

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

The network communication protocol used by the fleet.

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

The network communication protocol used by the fleet.

*/ inline IpPermission& WithProtocol(const IpProtocol& value) { SetProtocol(value); return *this;} /** *

The network communication protocol used by the fleet.

*/ inline IpPermission& WithProtocol(IpProtocol&& value) { SetProtocol(std::move(value)); return *this;} private: int m_fromPort; bool m_fromPortHasBeenSet; int m_toPort; bool m_toPortHasBeenSet; Aws::String m_ipRange; bool m_ipRangeHasBeenSet; IpProtocol m_protocol; bool m_protocolHasBeenSet; }; } // namespace Model } // namespace GameLift } // namespace Aws