AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
IpPermission.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/gamelift/GameLift_EXPORTS.h>
9#include <aws/gamelift/model/IpProtocol.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace GameLift {
21namespace Model {
22
34 public:
35 AWS_GAMELIFT_API IpPermission() = default;
36 AWS_GAMELIFT_API IpPermission(Aws::Utils::Json::JsonView jsonValue);
38 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
47 inline int GetFromPort() const { return m_fromPort; }
48 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
49 inline void SetFromPort(int value) {
50 m_fromPortHasBeenSet = true;
51 m_fromPort = value;
52 }
53 inline IpPermission& WithFromPort(int value) {
54 SetFromPort(value);
55 return *this;
56 }
58
60
67 inline int GetToPort() const { return m_toPort; }
68 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
69 inline void SetToPort(int value) {
70 m_toPortHasBeenSet = true;
71 m_toPort = value;
72 }
73 inline IpPermission& WithToPort(int value) {
74 SetToPort(value);
75 return *this;
76 }
78
80
85 inline const Aws::String& GetIpRange() const { return m_ipRange; }
86 inline bool IpRangeHasBeenSet() const { return m_ipRangeHasBeenSet; }
87 template <typename IpRangeT = Aws::String>
88 void SetIpRange(IpRangeT&& value) {
89 m_ipRangeHasBeenSet = true;
90 m_ipRange = std::forward<IpRangeT>(value);
91 }
92 template <typename IpRangeT = Aws::String>
93 IpPermission& WithIpRange(IpRangeT&& value) {
94 SetIpRange(std::forward<IpRangeT>(value));
95 return *this;
96 }
98
100
103 inline IpProtocol GetProtocol() const { return m_protocol; }
104 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
105 inline void SetProtocol(IpProtocol value) {
106 m_protocolHasBeenSet = true;
107 m_protocol = value;
108 }
110 SetProtocol(value);
111 return *this;
112 }
114 private:
115 int m_fromPort{0};
116
117 int m_toPort{0};
118
119 Aws::String m_ipRange;
120
122 bool m_fromPortHasBeenSet = false;
123 bool m_toPortHasBeenSet = false;
124 bool m_ipRangeHasBeenSet = false;
125 bool m_protocolHasBeenSet = false;
126};
127
128} // namespace Model
129} // namespace GameLift
130} // namespace Aws
AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const
IpPermission & WithIpRange(IpRangeT &&value)
AWS_GAMELIFT_API IpPermission(Aws::Utils::Json::JsonView jsonValue)
AWS_GAMELIFT_API IpPermission & operator=(Aws::Utils::Json::JsonView jsonValue)
IpPermission & WithProtocol(IpProtocol value)
const Aws::String & GetIpRange() const
IpPermission & WithToPort(int value)
void SetProtocol(IpProtocol value)
void SetIpRange(IpRangeT &&value)
AWS_GAMELIFT_API IpPermission()=default
IpPermission & WithFromPort(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue