AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
ContainerPortRange.h
1
6#pragma once
7#include <aws/crt/cbor/Cbor.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 Cbor {
16class CborValue;
17} // namespace Cbor
18} // namespace Utils
19namespace GameLift {
20namespace Model {
21
31 public:
32 AWS_GAMELIFT_API ContainerPortRange() = default;
33 AWS_GAMELIFT_API ContainerPortRange(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
34 AWS_GAMELIFT_API ContainerPortRange& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_GAMELIFT_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
36
38
41 inline int64_t GetFromPort() const { return m_fromPort; }
42 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
43 inline void SetFromPort(int64_t value) {
44 m_fromPortHasBeenSet = true;
45 m_fromPort = value;
46 }
47 inline ContainerPortRange& WithFromPort(int64_t value) {
48 SetFromPort(value);
49 return *this;
50 }
52
54
59 inline int64_t GetToPort() const { return m_toPort; }
60 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
61 inline void SetToPort(int64_t value) {
62 m_toPortHasBeenSet = true;
63 m_toPort = value;
64 }
65 inline ContainerPortRange& WithToPort(int64_t value) {
66 SetToPort(value);
67 return *this;
68 }
70
72
75 inline IpProtocol GetProtocol() const { return m_protocol; }
76 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
77 inline void SetProtocol(IpProtocol value) {
78 m_protocolHasBeenSet = true;
79 m_protocol = value;
80 }
82 SetProtocol(value);
83 return *this;
84 }
86 private:
87 int64_t m_fromPort{0};
88
89 int64_t m_toPort{0};
90
92 bool m_fromPortHasBeenSet = false;
93 bool m_toPortHasBeenSet = false;
94 bool m_protocolHasBeenSet = false;
95};
96
97} // namespace Model
98} // namespace GameLift
99} // namespace Aws
AWS_GAMELIFT_API ContainerPortRange & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_GAMELIFT_API ContainerPortRange()=default
AWS_GAMELIFT_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
ContainerPortRange & WithProtocol(IpProtocol value)
ContainerPortRange & WithFromPort(int64_t value)
AWS_GAMELIFT_API ContainerPortRange(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
ContainerPortRange & WithToPort(int64_t value)