AWS SDK for C++  1.9.21
AWS SDK for C++
StopInstanceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Lightsail
15 {
16 namespace Model
17 {
18 
22  {
23  public:
25 
26  // Service request name is the Operation name which will send this request out,
27  // each operation should has unique request name, so that we can get operation's name from this request.
28  // Note: this is not true for response, multiple operations may have the same response name,
29  // so we can not get operation's name from response.
30  inline virtual const char* GetServiceRequestName() const override { return "StopInstance"; }
31 
32  Aws::String SerializePayload() const override;
33 
35 
36 
40  inline const Aws::String& GetInstanceName() const{ return m_instanceName; }
41 
45  inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; }
46 
50  inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; }
51 
55  inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); }
56 
60  inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); }
61 
65  inline StopInstanceRequest& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;}
66 
70  inline StopInstanceRequest& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;}
71 
75  inline StopInstanceRequest& WithInstanceName(const char* value) { SetInstanceName(value); return *this;}
76 
77 
85  inline bool GetForce() const{ return m_force; }
86 
94  inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
95 
103  inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; }
104 
112  inline StopInstanceRequest& WithForce(bool value) { SetForce(value); return *this;}
113 
114  private:
115 
116  Aws::String m_instanceName;
117  bool m_instanceNameHasBeenSet;
118 
119  bool m_force;
120  bool m_forceHasBeenSet;
121  };
122 
123 } // namespace Model
124 } // namespace Lightsail
125 } // namespace Aws
Aws::Lightsail::Model::StopInstanceRequest::ForceHasBeenSet
bool ForceHasBeenSet() const
Definition: StopInstanceRequest.h:94
Aws::Lightsail::Model::StopInstanceRequest::InstanceNameHasBeenSet
bool InstanceNameHasBeenSet() const
Definition: StopInstanceRequest.h:45
Aws::Lightsail::Model::StopInstanceRequest::SetInstanceName
void SetInstanceName(const char *value)
Definition: StopInstanceRequest.h:60
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Lightsail::Model::StopInstanceRequest::StopInstanceRequest
StopInstanceRequest()
Aws::Lightsail::Model::StopInstanceRequest::WithInstanceName
StopInstanceRequest & WithInstanceName(const char *value)
Definition: StopInstanceRequest.h:75
Aws::Lightsail::Model::StopInstanceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::Lightsail::Model::StopInstanceRequest::WithInstanceName
StopInstanceRequest & WithInstanceName(const Aws::String &value)
Definition: StopInstanceRequest.h:65
LightsailRequest.h
Aws::Lightsail::Model::StopInstanceRequest::GetInstanceName
const Aws::String & GetInstanceName() const
Definition: StopInstanceRequest.h:40
Aws::Lightsail::Model::StopInstanceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: StopInstanceRequest.h:30
Aws::Lightsail::Model::StopInstanceRequest::SetForce
void SetForce(bool value)
Definition: StopInstanceRequest.h:103
Aws::Lightsail::Model::StopInstanceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Lightsail::LightsailRequest
Definition: LightsailRequest.h:17
AWSString.h
Lightsail_EXPORTS.h
Aws::Lightsail::Model::StopInstanceRequest::SetInstanceName
void SetInstanceName(Aws::String &&value)
Definition: StopInstanceRequest.h:55
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::StopInstanceRequest::WithInstanceName
StopInstanceRequest & WithInstanceName(Aws::String &&value)
Definition: StopInstanceRequest.h:70
Aws::Lightsail::Model::StopInstanceRequest::GetForce
bool GetForce() const
Definition: StopInstanceRequest.h:85
Aws::Lightsail::Model::StopInstanceRequest::SetInstanceName
void SetInstanceName(const Aws::String &value)
Definition: StopInstanceRequest.h:50
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28
Aws::Lightsail::Model::StopInstanceRequest::WithForce
StopInstanceRequest & WithForce(bool value)
Definition: StopInstanceRequest.h:112
Aws::Lightsail::Model::StopInstanceRequest
Definition: StopInstanceRequest.h:22