AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
TransitGatewayRoute.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/TransitGatewayRouteAttachment.h>
12#include <aws/ec2/model/TransitGatewayRouteState.h>
13#include <aws/ec2/model/TransitGatewayRouteType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2 {
24namespace Model {
25
33 public:
34 AWS_EC2_API TransitGatewayRoute() = default;
35 AWS_EC2_API TransitGatewayRoute(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
45 inline const Aws::String& GetDestinationCidrBlock() const { return m_destinationCidrBlock; }
46 inline bool DestinationCidrBlockHasBeenSet() const { return m_destinationCidrBlockHasBeenSet; }
47 template <typename DestinationCidrBlockT = Aws::String>
48 void SetDestinationCidrBlock(DestinationCidrBlockT&& value) {
49 m_destinationCidrBlockHasBeenSet = true;
50 m_destinationCidrBlock = std::forward<DestinationCidrBlockT>(value);
51 }
52 template <typename DestinationCidrBlockT = Aws::String>
53 TransitGatewayRoute& WithDestinationCidrBlock(DestinationCidrBlockT&& value) {
54 SetDestinationCidrBlock(std::forward<DestinationCidrBlockT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetPrefixListId() const { return m_prefixListId; }
64 inline bool PrefixListIdHasBeenSet() const { return m_prefixListIdHasBeenSet; }
65 template <typename PrefixListIdT = Aws::String>
66 void SetPrefixListId(PrefixListIdT&& value) {
67 m_prefixListIdHasBeenSet = true;
68 m_prefixListId = std::forward<PrefixListIdT>(value);
69 }
70 template <typename PrefixListIdT = Aws::String>
71 TransitGatewayRoute& WithPrefixListId(PrefixListIdT&& value) {
72 SetPrefixListId(std::forward<PrefixListIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetTransitGatewayRouteTableAnnouncementId() const { return m_transitGatewayRouteTableAnnouncementId; }
82 inline bool TransitGatewayRouteTableAnnouncementIdHasBeenSet() const { return m_transitGatewayRouteTableAnnouncementIdHasBeenSet; }
83 template <typename TransitGatewayRouteTableAnnouncementIdT = Aws::String>
84 void SetTransitGatewayRouteTableAnnouncementId(TransitGatewayRouteTableAnnouncementIdT&& value) {
85 m_transitGatewayRouteTableAnnouncementIdHasBeenSet = true;
86 m_transitGatewayRouteTableAnnouncementId = std::forward<TransitGatewayRouteTableAnnouncementIdT>(value);
87 }
88 template <typename TransitGatewayRouteTableAnnouncementIdT = Aws::String>
89 TransitGatewayRoute& WithTransitGatewayRouteTableAnnouncementId(TransitGatewayRouteTableAnnouncementIdT&& value) {
90 SetTransitGatewayRouteTableAnnouncementId(std::forward<TransitGatewayRouteTableAnnouncementIdT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::Vector<TransitGatewayRouteAttachment>& GetTransitGatewayAttachments() const { return m_transitGatewayAttachments; }
100 inline bool TransitGatewayAttachmentsHasBeenSet() const { return m_transitGatewayAttachmentsHasBeenSet; }
101 template <typename TransitGatewayAttachmentsT = Aws::Vector<TransitGatewayRouteAttachment>>
102 void SetTransitGatewayAttachments(TransitGatewayAttachmentsT&& value) {
103 m_transitGatewayAttachmentsHasBeenSet = true;
104 m_transitGatewayAttachments = std::forward<TransitGatewayAttachmentsT>(value);
105 }
106 template <typename TransitGatewayAttachmentsT = Aws::Vector<TransitGatewayRouteAttachment>>
107 TransitGatewayRoute& WithTransitGatewayAttachments(TransitGatewayAttachmentsT&& value) {
108 SetTransitGatewayAttachments(std::forward<TransitGatewayAttachmentsT>(value));
109 return *this;
110 }
111 template <typename TransitGatewayAttachmentsT = TransitGatewayRouteAttachment>
112 TransitGatewayRoute& AddTransitGatewayAttachments(TransitGatewayAttachmentsT&& value) {
113 m_transitGatewayAttachmentsHasBeenSet = true;
114 m_transitGatewayAttachments.emplace_back(std::forward<TransitGatewayAttachmentsT>(value));
115 return *this;
116 }
118
120
123 inline TransitGatewayRouteType GetType() const { return m_type; }
124 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
125 inline void SetType(TransitGatewayRouteType value) {
126 m_typeHasBeenSet = true;
127 m_type = value;
128 }
130 SetType(value);
131 return *this;
132 }
134
136
139 inline TransitGatewayRouteState GetState() const { return m_state; }
140 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
142 m_stateHasBeenSet = true;
143 m_state = value;
144 }
146 SetState(value);
147 return *this;
148 }
150 private:
151 Aws::String m_destinationCidrBlock;
152
153 Aws::String m_prefixListId;
154
155 Aws::String m_transitGatewayRouteTableAnnouncementId;
156
157 Aws::Vector<TransitGatewayRouteAttachment> m_transitGatewayAttachments;
158
160
162 bool m_destinationCidrBlockHasBeenSet = false;
163 bool m_prefixListIdHasBeenSet = false;
164 bool m_transitGatewayRouteTableAnnouncementIdHasBeenSet = false;
165 bool m_transitGatewayAttachmentsHasBeenSet = false;
166 bool m_typeHasBeenSet = false;
167 bool m_stateHasBeenSet = false;
168};
169
170} // namespace Model
171} // namespace EC2
172} // namespace Aws
AWS_EC2_API TransitGatewayRoute(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API TransitGatewayRoute & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetType(TransitGatewayRouteType value)
void SetDestinationCidrBlock(DestinationCidrBlockT &&value)
TransitGatewayRouteType GetType() const
void SetTransitGatewayRouteTableAnnouncementId(TransitGatewayRouteTableAnnouncementIdT &&value)
TransitGatewayRouteState GetState() const
TransitGatewayRoute & WithState(TransitGatewayRouteState value)
AWS_EC2_API TransitGatewayRoute()=default
TransitGatewayRoute & AddTransitGatewayAttachments(TransitGatewayAttachmentsT &&value)
const Aws::Vector< TransitGatewayRouteAttachment > & GetTransitGatewayAttachments() const
TransitGatewayRoute & WithTransitGatewayAttachments(TransitGatewayAttachmentsT &&value)
void SetTransitGatewayAttachments(TransitGatewayAttachmentsT &&value)
TransitGatewayRoute & WithDestinationCidrBlock(DestinationCidrBlockT &&value)
const Aws::String & GetTransitGatewayRouteTableAnnouncementId() const
TransitGatewayRoute & WithType(TransitGatewayRouteType value)
const Aws::String & GetPrefixListId() const
const Aws::String & GetDestinationCidrBlock() const
TransitGatewayRoute & WithTransitGatewayRouteTableAnnouncementId(TransitGatewayRouteTableAnnouncementIdT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetState(TransitGatewayRouteState value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
TransitGatewayRoute & WithPrefixListId(PrefixListIdT &&value)
void SetPrefixListId(PrefixListIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream