AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
AssociateAddressRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace EC2 {
15namespace Model {
16
20 public:
21 AWS_EC2_API AssociateAddressRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "AssociateAddress"; }
28
29 AWS_EC2_API Aws::String SerializePayload() const override;
30
31 protected:
32 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
33
34 public:
36
39 inline const Aws::String& GetAllocationId() const { return m_allocationId; }
40 inline bool AllocationIdHasBeenSet() const { return m_allocationIdHasBeenSet; }
41 template <typename AllocationIdT = Aws::String>
42 void SetAllocationId(AllocationIdT&& value) {
43 m_allocationIdHasBeenSet = true;
44 m_allocationId = std::forward<AllocationIdT>(value);
45 }
46 template <typename AllocationIdT = Aws::String>
47 AssociateAddressRequest& WithAllocationId(AllocationIdT&& value) {
48 SetAllocationId(std::forward<AllocationIdT>(value));
49 return *this;
50 }
52
54
59 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
60 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
61 template <typename InstanceIdT = Aws::String>
62 void SetInstanceId(InstanceIdT&& value) {
63 m_instanceIdHasBeenSet = true;
64 m_instanceId = std::forward<InstanceIdT>(value);
65 }
66 template <typename InstanceIdT = Aws::String>
68 SetInstanceId(std::forward<InstanceIdT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetPublicIp() const { return m_publicIp; }
78 inline bool PublicIpHasBeenSet() const { return m_publicIpHasBeenSet; }
79 template <typename PublicIpT = Aws::String>
80 void SetPublicIp(PublicIpT&& value) {
81 m_publicIpHasBeenSet = true;
82 m_publicIp = std::forward<PublicIpT>(value);
83 }
84 template <typename PublicIpT = Aws::String>
86 SetPublicIp(std::forward<PublicIpT>(value));
87 return *this;
88 }
90
92
98 inline bool GetDryRun() const { return m_dryRun; }
99 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
100 inline void SetDryRun(bool value) {
101 m_dryRunHasBeenSet = true;
102 m_dryRun = value;
103 }
105 SetDryRun(value);
106 return *this;
107 }
109
111
116 inline const Aws::String& GetNetworkInterfaceId() const { return m_networkInterfaceId; }
117 inline bool NetworkInterfaceIdHasBeenSet() const { return m_networkInterfaceIdHasBeenSet; }
118 template <typename NetworkInterfaceIdT = Aws::String>
119 void SetNetworkInterfaceId(NetworkInterfaceIdT&& value) {
120 m_networkInterfaceIdHasBeenSet = true;
121 m_networkInterfaceId = std::forward<NetworkInterfaceIdT>(value);
122 }
123 template <typename NetworkInterfaceIdT = Aws::String>
124 AssociateAddressRequest& WithNetworkInterfaceId(NetworkInterfaceIdT&& value) {
125 SetNetworkInterfaceId(std::forward<NetworkInterfaceIdT>(value));
126 return *this;
127 }
129
131
136 inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
137 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
138 template <typename PrivateIpAddressT = Aws::String>
139 void SetPrivateIpAddress(PrivateIpAddressT&& value) {
140 m_privateIpAddressHasBeenSet = true;
141 m_privateIpAddress = std::forward<PrivateIpAddressT>(value);
142 }
143 template <typename PrivateIpAddressT = Aws::String>
144 AssociateAddressRequest& WithPrivateIpAddress(PrivateIpAddressT&& value) {
145 SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value));
146 return *this;
147 }
149
151
155 inline bool GetAllowReassociation() const { return m_allowReassociation; }
156 inline bool AllowReassociationHasBeenSet() const { return m_allowReassociationHasBeenSet; }
157 inline void SetAllowReassociation(bool value) {
158 m_allowReassociationHasBeenSet = true;
159 m_allowReassociation = value;
160 }
163 return *this;
164 }
166 private:
167 Aws::String m_allocationId;
168
169 Aws::String m_instanceId;
170
171 Aws::String m_publicIp;
172
173 bool m_dryRun{false};
174
175 Aws::String m_networkInterfaceId;
176
177 Aws::String m_privateIpAddress;
178
179 bool m_allowReassociation{false};
180 bool m_allocationIdHasBeenSet = false;
181 bool m_instanceIdHasBeenSet = false;
182 bool m_publicIpHasBeenSet = false;
183 bool m_dryRunHasBeenSet = false;
184 bool m_networkInterfaceIdHasBeenSet = false;
185 bool m_privateIpAddressHasBeenSet = false;
186 bool m_allowReassociationHasBeenSet = false;
187};
188
189} // namespace Model
190} // namespace EC2
191} // namespace Aws
AssociateAddressRequest & WithAllowReassociation(bool value)
AWS_EC2_API AssociateAddressRequest()=default
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AssociateAddressRequest & WithPrivateIpAddress(PrivateIpAddressT &&value)
AssociateAddressRequest & WithPublicIp(PublicIpT &&value)
virtual const char * GetServiceRequestName() const override
void SetNetworkInterfaceId(NetworkInterfaceIdT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AssociateAddressRequest & WithInstanceId(InstanceIdT &&value)
AssociateAddressRequest & WithAllocationId(AllocationIdT &&value)
AssociateAddressRequest & WithNetworkInterfaceId(NetworkInterfaceIdT &&value)
void SetPrivateIpAddress(PrivateIpAddressT &&value)
AssociateAddressRequest & WithDryRun(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String