AWS SDK for C++  1.9.104
AWS SDK for C++
StopInstancesRequest.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>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace EC2
16 {
17 namespace Model
18 {
19 
23  {
24  public:
26 
27  // Service request name is the Operation name which will send this request out,
28  // each operation should has unique request name, so that we can get operation's name from this request.
29  // Note: this is not true for response, multiple operations may have the same response name,
30  // so we can not get operation's name from response.
31  inline virtual const char* GetServiceRequestName() const override { return "StopInstances"; }
32 
33  Aws::String SerializePayload() const override;
34 
35  protected:
36  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
37 
38  public:
39 
43  inline const Aws::Vector<Aws::String>& GetInstanceIds() const{ return m_instanceIds; }
44 
48  inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
49 
53  inline void SetInstanceIds(const Aws::Vector<Aws::String>& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
54 
58  inline void SetInstanceIds(Aws::Vector<Aws::String>&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); }
59 
63  inline StopInstancesRequest& WithInstanceIds(const Aws::Vector<Aws::String>& value) { SetInstanceIds(value); return *this;}
64 
68  inline StopInstancesRequest& WithInstanceIds(Aws::Vector<Aws::String>&& value) { SetInstanceIds(std::move(value)); return *this;}
69 
73  inline StopInstancesRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
74 
78  inline StopInstancesRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; }
79 
83  inline StopInstancesRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
84 
85 
94  inline bool GetHibernate() const{ return m_hibernate; }
95 
104  inline bool HibernateHasBeenSet() const { return m_hibernateHasBeenSet; }
105 
114  inline void SetHibernate(bool value) { m_hibernateHasBeenSet = true; m_hibernate = value; }
115 
124  inline StopInstancesRequest& WithHibernate(bool value) { SetHibernate(value); return *this;}
125 
126 
133  inline bool GetDryRun() const{ return m_dryRun; }
134 
141  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
142 
149  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
150 
157  inline StopInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
158 
159 
166  inline bool GetForce() const{ return m_force; }
167 
174  inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
175 
182  inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; }
183 
190  inline StopInstancesRequest& WithForce(bool value) { SetForce(value); return *this;}
191 
192  private:
193 
194  Aws::Vector<Aws::String> m_instanceIds;
195  bool m_instanceIdsHasBeenSet;
196 
197  bool m_hibernate;
198  bool m_hibernateHasBeenSet;
199 
200  bool m_dryRun;
201  bool m_dryRunHasBeenSet;
202 
203  bool m_force;
204  bool m_forceHasBeenSet;
205  };
206 
207 } // namespace Model
208 } // namespace EC2
209 } // namespace Aws
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::StopInstancesRequest::SetHibernate
void SetHibernate(bool value)
Definition: StopInstancesRequest.h:114
Aws::EC2::Model::StopInstancesRequest::StopInstancesRequest
StopInstancesRequest()
Aws::EC2::Model::StopInstancesRequest::WithDryRun
StopInstancesRequest & WithDryRun(bool value)
Definition: StopInstancesRequest.h:157
Aws::EC2::Model::StopInstancesRequest::SetDryRun
void SetDryRun(bool value)
Definition: StopInstancesRequest.h:149
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::StopInstancesRequest::HibernateHasBeenSet
bool HibernateHasBeenSet() const
Definition: StopInstancesRequest.h:104
Aws::EC2::Model::StopInstancesRequest::ForceHasBeenSet
bool ForceHasBeenSet() const
Definition: StopInstancesRequest.h:174
Aws::EC2::Model::StopInstancesRequest::WithHibernate
StopInstancesRequest & WithHibernate(bool value)
Definition: StopInstancesRequest.h:124
AWSVector.h
Aws::EC2::Model::StopInstancesRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: StopInstancesRequest.h:31
Aws::EC2::Model::StopInstancesRequest::SetForce
void SetForce(bool value)
Definition: StopInstancesRequest.h:182
Aws::EC2::Model::StopInstancesRequest::WithInstanceIds
StopInstancesRequest & WithInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: StopInstancesRequest.h:63
Aws::EC2::Model::StopInstancesRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: StopInstancesRequest.h:141
Aws::EC2::Model::StopInstancesRequest
Definition: StopInstancesRequest.h:23
Aws::EC2::Model::StopInstancesRequest::GetHibernate
bool GetHibernate() const
Definition: StopInstancesRequest.h:94
EC2Request.h
Aws::EC2::Model::StopInstancesRequest::GetDryRun
bool GetDryRun() const
Definition: StopInstancesRequest.h:133
Aws::EC2::Model::StopInstancesRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWSString.h
Aws::EC2::Model::StopInstancesRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::StopInstancesRequest::SetInstanceIds
void SetInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: StopInstancesRequest.h:53
Aws::EC2::Model::StopInstancesRequest::WithInstanceIds
StopInstancesRequest & WithInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: StopInstancesRequest.h:68
Aws::EC2::Model::StopInstancesRequest::AddInstanceIds
StopInstancesRequest & AddInstanceIds(Aws::String &&value)
Definition: StopInstancesRequest.h:78
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::StopInstancesRequest::WithForce
StopInstancesRequest & WithForce(bool value)
Definition: StopInstancesRequest.h:190
Aws::EC2::Model::StopInstancesRequest::AddInstanceIds
StopInstancesRequest & AddInstanceIds(const char *value)
Definition: StopInstancesRequest.h:83
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::StopInstancesRequest::GetForce
bool GetForce() const
Definition: StopInstancesRequest.h:166
Aws::EC2::Model::StopInstancesRequest::InstanceIdsHasBeenSet
bool InstanceIdsHasBeenSet() const
Definition: StopInstancesRequest.h:48
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::StopInstancesRequest::GetInstanceIds
const Aws::Vector< Aws::String > & GetInstanceIds() const
Definition: StopInstancesRequest.h:43
EC2_EXPORTS.h
Aws::EC2::Model::StopInstancesRequest::SetInstanceIds
void SetInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: StopInstancesRequest.h:58
Aws::EC2::Model::StopInstancesRequest::AddInstanceIds
StopInstancesRequest & AddInstanceIds(const Aws::String &value)
Definition: StopInstancesRequest.h:73