AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
IpPermission.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/gamelift/GameLift_EXPORTS.h>
10#include <aws/gamelift/model/IpProtocol.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace GameLift {
21namespace Model {
22
34 public:
35 AWS_GAMELIFT_API IpPermission() = default;
36 AWS_GAMELIFT_API IpPermission(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_GAMELIFT_API IpPermission& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_GAMELIFT_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
39
41
47 inline int64_t GetFromPort() const { return m_fromPort; }
48 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
49 inline void SetFromPort(int64_t value) {
50 m_fromPortHasBeenSet = true;
51 m_fromPort = value;
52 }
53 inline IpPermission& WithFromPort(int64_t value) {
54 SetFromPort(value);
55 return *this;
56 }
58
60
67 inline int64_t GetToPort() const { return m_toPort; }
68 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
69 inline void SetToPort(int64_t value) {
70 m_toPortHasBeenSet = true;
71 m_toPort = value;
72 }
73 inline IpPermission& WithToPort(int64_t 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 int64_t m_fromPort{0};
116
117 int64_t 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 IpPermission & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
IpPermission & WithIpRange(IpRangeT &&value)
IpPermission & WithProtocol(IpProtocol value)
const Aws::String & GetIpRange() const
IpPermission & WithFromPort(int64_t value)
AWS_GAMELIFT_API IpPermission(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_GAMELIFT_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
void SetProtocol(IpProtocol value)
IpPermission & WithToPort(int64_t value)
void SetIpRange(IpRangeT &&value)
AWS_GAMELIFT_API IpPermission()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String