1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ec2/EC2_EXPORTS.h> 8 #include <aws/ec2/EC2Request.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/ec2/model/Filter.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace EC2 17 { 18 namespace Model 19 { 20 21 /** 22 */ 23 class AWS_EC2_API SearchTransitGatewayRoutesRequest : public EC2Request 24 { 25 public: 26 SearchTransitGatewayRoutesRequest(); 27 28 // Service request name is the Operation name which will send this request out, 29 // each operation should has unique request name, so that we can get operation's name from this request. 30 // Note: this is not true for response, multiple operations may have the same response name, 31 // so we can not get operation's name from response. GetServiceRequestName()32 inline virtual const char* GetServiceRequestName() const override { return "SearchTransitGatewayRoutes"; } 33 34 Aws::String SerializePayload() const override; 35 36 protected: 37 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 38 39 public: 40 41 /** 42 * <p>The ID of the transit gateway route table.</p> 43 */ GetTransitGatewayRouteTableId()44 inline const Aws::String& GetTransitGatewayRouteTableId() const{ return m_transitGatewayRouteTableId; } 45 46 /** 47 * <p>The ID of the transit gateway route table.</p> 48 */ TransitGatewayRouteTableIdHasBeenSet()49 inline bool TransitGatewayRouteTableIdHasBeenSet() const { return m_transitGatewayRouteTableIdHasBeenSet; } 50 51 /** 52 * <p>The ID of the transit gateway route table.</p> 53 */ SetTransitGatewayRouteTableId(const Aws::String & value)54 inline void SetTransitGatewayRouteTableId(const Aws::String& value) { m_transitGatewayRouteTableIdHasBeenSet = true; m_transitGatewayRouteTableId = value; } 55 56 /** 57 * <p>The ID of the transit gateway route table.</p> 58 */ SetTransitGatewayRouteTableId(Aws::String && value)59 inline void SetTransitGatewayRouteTableId(Aws::String&& value) { m_transitGatewayRouteTableIdHasBeenSet = true; m_transitGatewayRouteTableId = std::move(value); } 60 61 /** 62 * <p>The ID of the transit gateway route table.</p> 63 */ SetTransitGatewayRouteTableId(const char * value)64 inline void SetTransitGatewayRouteTableId(const char* value) { m_transitGatewayRouteTableIdHasBeenSet = true; m_transitGatewayRouteTableId.assign(value); } 65 66 /** 67 * <p>The ID of the transit gateway route table.</p> 68 */ WithTransitGatewayRouteTableId(const Aws::String & value)69 inline SearchTransitGatewayRoutesRequest& WithTransitGatewayRouteTableId(const Aws::String& value) { SetTransitGatewayRouteTableId(value); return *this;} 70 71 /** 72 * <p>The ID of the transit gateway route table.</p> 73 */ WithTransitGatewayRouteTableId(Aws::String && value)74 inline SearchTransitGatewayRoutesRequest& WithTransitGatewayRouteTableId(Aws::String&& value) { SetTransitGatewayRouteTableId(std::move(value)); return *this;} 75 76 /** 77 * <p>The ID of the transit gateway route table.</p> 78 */ WithTransitGatewayRouteTableId(const char * value)79 inline SearchTransitGatewayRoutesRequest& WithTransitGatewayRouteTableId(const char* value) { SetTransitGatewayRouteTableId(value); return *this;} 80 81 82 /** 83 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 84 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 85 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 86 * resource id of the transit gateway attachment.</p> </li> <li> <p> 87 * <code>attachment.resource-type</code> - The attachment resource type. Valid 88 * values are <code>vpc</code> | <code>vpn</code> | 89 * <code>direct-connect-gateway</code> | <code>peering</code> | 90 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 91 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 92 * exact match of the specified filter.</p> </li> <li> <p> 93 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 94 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 95 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 96 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 97 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 98 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 99 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 100 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 101 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 102 * <code>static</code>).</p> </li> </ul> 103 */ GetFilters()104 inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; } 105 106 /** 107 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 108 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 109 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 110 * resource id of the transit gateway attachment.</p> </li> <li> <p> 111 * <code>attachment.resource-type</code> - The attachment resource type. Valid 112 * values are <code>vpc</code> | <code>vpn</code> | 113 * <code>direct-connect-gateway</code> | <code>peering</code> | 114 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 115 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 116 * exact match of the specified filter.</p> </li> <li> <p> 117 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 118 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 119 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 120 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 121 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 122 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 123 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 124 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 125 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 126 * <code>static</code>).</p> </li> </ul> 127 */ FiltersHasBeenSet()128 inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; } 129 130 /** 131 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 132 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 133 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 134 * resource id of the transit gateway attachment.</p> </li> <li> <p> 135 * <code>attachment.resource-type</code> - The attachment resource type. Valid 136 * values are <code>vpc</code> | <code>vpn</code> | 137 * <code>direct-connect-gateway</code> | <code>peering</code> | 138 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 139 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 140 * exact match of the specified filter.</p> </li> <li> <p> 141 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 142 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 143 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 144 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 145 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 146 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 147 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 148 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 149 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 150 * <code>static</code>).</p> </li> </ul> 151 */ SetFilters(const Aws::Vector<Filter> & value)152 inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; } 153 154 /** 155 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 156 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 157 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 158 * resource id of the transit gateway attachment.</p> </li> <li> <p> 159 * <code>attachment.resource-type</code> - The attachment resource type. Valid 160 * values are <code>vpc</code> | <code>vpn</code> | 161 * <code>direct-connect-gateway</code> | <code>peering</code> | 162 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 163 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 164 * exact match of the specified filter.</p> </li> <li> <p> 165 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 166 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 167 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 168 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 169 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 170 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 171 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 172 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 173 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 174 * <code>static</code>).</p> </li> </ul> 175 */ SetFilters(Aws::Vector<Filter> && value)176 inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); } 177 178 /** 179 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 180 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 181 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 182 * resource id of the transit gateway attachment.</p> </li> <li> <p> 183 * <code>attachment.resource-type</code> - The attachment resource type. Valid 184 * values are <code>vpc</code> | <code>vpn</code> | 185 * <code>direct-connect-gateway</code> | <code>peering</code> | 186 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 187 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 188 * exact match of the specified filter.</p> </li> <li> <p> 189 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 190 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 191 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 192 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 193 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 194 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 195 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 196 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 197 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 198 * <code>static</code>).</p> </li> </ul> 199 */ WithFilters(const Aws::Vector<Filter> & value)200 inline SearchTransitGatewayRoutesRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;} 201 202 /** 203 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 204 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 205 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 206 * resource id of the transit gateway attachment.</p> </li> <li> <p> 207 * <code>attachment.resource-type</code> - The attachment resource type. Valid 208 * values are <code>vpc</code> | <code>vpn</code> | 209 * <code>direct-connect-gateway</code> | <code>peering</code> | 210 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 211 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 212 * exact match of the specified filter.</p> </li> <li> <p> 213 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 214 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 215 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 216 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 217 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 218 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 219 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 220 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 221 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 222 * <code>static</code>).</p> </li> </ul> 223 */ WithFilters(Aws::Vector<Filter> && value)224 inline SearchTransitGatewayRoutesRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;} 225 226 /** 227 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 228 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 229 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 230 * resource id of the transit gateway attachment.</p> </li> <li> <p> 231 * <code>attachment.resource-type</code> - The attachment resource type. Valid 232 * values are <code>vpc</code> | <code>vpn</code> | 233 * <code>direct-connect-gateway</code> | <code>peering</code> | 234 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 235 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 236 * exact match of the specified filter.</p> </li> <li> <p> 237 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 238 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 239 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 240 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 241 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 242 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 243 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 244 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 245 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 246 * <code>static</code>).</p> </li> </ul> 247 */ AddFilters(const Filter & value)248 inline SearchTransitGatewayRoutesRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; } 249 250 /** 251 * <p>One or more filters. The possible values are:</p> <ul> <li> <p> 252 * <code>attachment.transit-gateway-attachment-id</code>- The id of the transit 253 * gateway attachment.</p> </li> <li> <p> <code>attachment.resource-id</code> - The 254 * resource id of the transit gateway attachment.</p> </li> <li> <p> 255 * <code>attachment.resource-type</code> - The attachment resource type. Valid 256 * values are <code>vpc</code> | <code>vpn</code> | 257 * <code>direct-connect-gateway</code> | <code>peering</code> | 258 * <code>connect</code>.</p> </li> <li> <p> <code>prefix-list-id</code> - The ID of 259 * the prefix list.</p> </li> <li> <p> <code>route-search.exact-match</code> - The 260 * exact match of the specified filter.</p> </li> <li> <p> 261 * <code>route-search.longest-prefix-match</code> - The longest prefix that matches 262 * the route.</p> </li> <li> <p> <code>route-search.subnet-of-match</code> - The 263 * routes with a subnet that match the specified CIDR filter.</p> </li> <li> <p> 264 * <code>route-search.supernet-of-match</code> - The routes with a CIDR that 265 * encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 266 * routes in your route table and you specify supernet-of-match as 10.0.1.0/30, 267 * then the result returns 10.0.1.0/29.</p> </li> <li> <p> <code>state</code> - The 268 * state of the route (<code>active</code> | <code>blackhole</code>).</p> </li> 269 * <li> <p> <code>type</code> - The type of route (<code>propagated</code> | 270 * <code>static</code>).</p> </li> </ul> 271 */ AddFilters(Filter && value)272 inline SearchTransitGatewayRoutesRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; } 273 274 275 /** 276 * <p>The maximum number of routes to return.</p> 277 */ GetMaxResults()278 inline int GetMaxResults() const{ return m_maxResults; } 279 280 /** 281 * <p>The maximum number of routes to return.</p> 282 */ MaxResultsHasBeenSet()283 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } 284 285 /** 286 * <p>The maximum number of routes to return.</p> 287 */ SetMaxResults(int value)288 inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } 289 290 /** 291 * <p>The maximum number of routes to return.</p> 292 */ WithMaxResults(int value)293 inline SearchTransitGatewayRoutesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} 294 295 296 /** 297 * <p>Checks whether you have the required permissions for the action, without 298 * actually making the request, and provides an error response. If you have the 299 * required permissions, the error response is <code>DryRunOperation</code>. 300 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 301 */ GetDryRun()302 inline bool GetDryRun() const{ return m_dryRun; } 303 304 /** 305 * <p>Checks whether you have the required permissions for the action, without 306 * actually making the request, and provides an error response. If you have the 307 * required permissions, the error response is <code>DryRunOperation</code>. 308 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 309 */ DryRunHasBeenSet()310 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } 311 312 /** 313 * <p>Checks whether you have the required permissions for the action, without 314 * actually making the request, and provides an error response. If you have the 315 * required permissions, the error response is <code>DryRunOperation</code>. 316 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 317 */ SetDryRun(bool value)318 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } 319 320 /** 321 * <p>Checks whether you have the required permissions for the action, without 322 * actually making the request, and provides an error response. If you have the 323 * required permissions, the error response is <code>DryRunOperation</code>. 324 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 325 */ WithDryRun(bool value)326 inline SearchTransitGatewayRoutesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} 327 328 private: 329 330 Aws::String m_transitGatewayRouteTableId; 331 bool m_transitGatewayRouteTableIdHasBeenSet; 332 333 Aws::Vector<Filter> m_filters; 334 bool m_filtersHasBeenSet; 335 336 int m_maxResults; 337 bool m_maxResultsHasBeenSet; 338 339 bool m_dryRun; 340 bool m_dryRunHasBeenSet; 341 }; 342 343 } // namespace Model 344 } // namespace EC2 345 } // namespace Aws 346