AWS SDK for C++  1.8.71
AWS SDK for C++
ModifyReservedInstancesRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
17 {
18 namespace Model
19 {
20 
28  {
29  public:
31 
32  // Service request name is the Operation name which will send this request out,
33  // each operation should has unique request name, so that we can get operation's name from this request.
34  // Note: this is not true for response, multiple operations may have the same response name,
35  // so we can not get operation's name from response.
36  inline virtual const char* GetServiceRequestName() const override { return "ModifyReservedInstances"; }
37 
38  Aws::String SerializePayload() const override;
39 
40  protected:
41  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
42 
43  public:
44 
48  inline const Aws::Vector<Aws::String>& GetReservedInstancesIds() const{ return m_reservedInstancesIds; }
49 
53  inline bool ReservedInstancesIdsHasBeenSet() const { return m_reservedInstancesIdsHasBeenSet; }
54 
58  inline void SetReservedInstancesIds(const Aws::Vector<Aws::String>& value) { m_reservedInstancesIdsHasBeenSet = true; m_reservedInstancesIds = value; }
59 
63  inline void SetReservedInstancesIds(Aws::Vector<Aws::String>&& value) { m_reservedInstancesIdsHasBeenSet = true; m_reservedInstancesIds = std::move(value); }
64 
68  inline ModifyReservedInstancesRequest& WithReservedInstancesIds(const Aws::Vector<Aws::String>& value) { SetReservedInstancesIds(value); return *this;}
69 
73  inline ModifyReservedInstancesRequest& WithReservedInstancesIds(Aws::Vector<Aws::String>&& value) { SetReservedInstancesIds(std::move(value)); return *this;}
74 
78  inline ModifyReservedInstancesRequest& AddReservedInstancesIds(const Aws::String& value) { m_reservedInstancesIdsHasBeenSet = true; m_reservedInstancesIds.push_back(value); return *this; }
79 
83  inline ModifyReservedInstancesRequest& AddReservedInstancesIds(Aws::String&& value) { m_reservedInstancesIdsHasBeenSet = true; m_reservedInstancesIds.push_back(std::move(value)); return *this; }
84 
88  inline ModifyReservedInstancesRequest& AddReservedInstancesIds(const char* value) { m_reservedInstancesIdsHasBeenSet = true; m_reservedInstancesIds.push_back(value); return *this; }
89 
90 
97  inline const Aws::String& GetClientToken() const{ return m_clientToken; }
98 
105  inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
106 
113  inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
114 
121  inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
122 
129  inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
130 
137  inline ModifyReservedInstancesRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
138 
145  inline ModifyReservedInstancesRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
146 
153  inline ModifyReservedInstancesRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
154 
155 
159  inline const Aws::Vector<ReservedInstancesConfiguration>& GetTargetConfigurations() const{ return m_targetConfigurations; }
160 
164  inline bool TargetConfigurationsHasBeenSet() const { return m_targetConfigurationsHasBeenSet; }
165 
169  inline void SetTargetConfigurations(const Aws::Vector<ReservedInstancesConfiguration>& value) { m_targetConfigurationsHasBeenSet = true; m_targetConfigurations = value; }
170 
174  inline void SetTargetConfigurations(Aws::Vector<ReservedInstancesConfiguration>&& value) { m_targetConfigurationsHasBeenSet = true; m_targetConfigurations = std::move(value); }
175 
179  inline ModifyReservedInstancesRequest& WithTargetConfigurations(const Aws::Vector<ReservedInstancesConfiguration>& value) { SetTargetConfigurations(value); return *this;}
180 
184  inline ModifyReservedInstancesRequest& WithTargetConfigurations(Aws::Vector<ReservedInstancesConfiguration>&& value) { SetTargetConfigurations(std::move(value)); return *this;}
185 
189  inline ModifyReservedInstancesRequest& AddTargetConfigurations(const ReservedInstancesConfiguration& value) { m_targetConfigurationsHasBeenSet = true; m_targetConfigurations.push_back(value); return *this; }
190 
194  inline ModifyReservedInstancesRequest& AddTargetConfigurations(ReservedInstancesConfiguration&& value) { m_targetConfigurationsHasBeenSet = true; m_targetConfigurations.push_back(std::move(value)); return *this; }
195 
196  private:
197 
198  Aws::Vector<Aws::String> m_reservedInstancesIds;
199  bool m_reservedInstancesIdsHasBeenSet;
200 
201  Aws::String m_clientToken;
202  bool m_clientTokenHasBeenSet;
203 
204  Aws::Vector<ReservedInstancesConfiguration> m_targetConfigurations;
205  bool m_targetConfigurationsHasBeenSet;
206  };
207 
208 } // namespace Model
209 } // namespace EC2
210 } // namespace Aws
const Aws::Vector< Aws::String > & GetReservedInstancesIds() const
const Aws::Vector< ReservedInstancesConfiguration > & GetTargetConfigurations() const
ModifyReservedInstancesRequest & WithReservedInstancesIds(Aws::Vector< Aws::String > &&value)
void SetTargetConfigurations(Aws::Vector< ReservedInstancesConfiguration > &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
ModifyReservedInstancesRequest & WithClientToken(const char *value)
ModifyReservedInstancesRequest & WithTargetConfigurations(Aws::Vector< ReservedInstancesConfiguration > &&value)
ModifyReservedInstancesRequest & AddTargetConfigurations(const ReservedInstancesConfiguration &value)
ModifyReservedInstancesRequest & WithClientToken(Aws::String &&value)
ModifyReservedInstancesRequest & AddReservedInstancesIds(const char *value)
void SetTargetConfigurations(const Aws::Vector< ReservedInstancesConfiguration > &value)
ModifyReservedInstancesRequest & AddTargetConfigurations(ReservedInstancesConfiguration &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ModifyReservedInstancesRequest & WithTargetConfigurations(const Aws::Vector< ReservedInstancesConfiguration > &value)
void SetReservedInstancesIds(Aws::Vector< Aws::String > &&value)
void SetReservedInstancesIds(const Aws::Vector< Aws::String > &value)
ModifyReservedInstancesRequest & WithReservedInstancesIds(const Aws::Vector< Aws::String > &value)
ModifyReservedInstancesRequest & AddReservedInstancesIds(Aws::String &&value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
ModifyReservedInstancesRequest & AddReservedInstancesIds(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
ModifyReservedInstancesRequest & WithClientToken(const Aws::String &value)