AWS SDK for C++  1.9.16
AWS SDK for C++
PurchaseScheduledInstancesRequest.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 #include <aws/core/utils/UUID.h>
14 
15 namespace Aws
16 {
17 namespace EC2
18 {
19 namespace Model
20 {
21 
29  {
30  public:
32 
33  // Service request name is the Operation name which will send this request out,
34  // each operation should has unique request name, so that we can get operation's name from this request.
35  // Note: this is not true for response, multiple operations may have the same response name,
36  // so we can not get operation's name from response.
37  inline virtual const char* GetServiceRequestName() const override { return "PurchaseScheduledInstances"; }
38 
39  Aws::String SerializePayload() const override;
40 
41  protected:
42  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
43 
44  public:
45 
52  inline const Aws::String& GetClientToken() const{ return m_clientToken; }
53 
60  inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
61 
68  inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
69 
76  inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
77 
84  inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
85 
92  inline PurchaseScheduledInstancesRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
93 
100  inline PurchaseScheduledInstancesRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
101 
108  inline PurchaseScheduledInstancesRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
109 
110 
117  inline bool GetDryRun() const{ return m_dryRun; }
118 
125  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
126 
133  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
134 
141  inline PurchaseScheduledInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
142 
143 
147  inline const Aws::Vector<PurchaseRequest>& GetPurchaseRequests() const{ return m_purchaseRequests; }
148 
152  inline bool PurchaseRequestsHasBeenSet() const { return m_purchaseRequestsHasBeenSet; }
153 
157  inline void SetPurchaseRequests(const Aws::Vector<PurchaseRequest>& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests = value; }
158 
162  inline void SetPurchaseRequests(Aws::Vector<PurchaseRequest>&& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests = std::move(value); }
163 
167  inline PurchaseScheduledInstancesRequest& WithPurchaseRequests(const Aws::Vector<PurchaseRequest>& value) { SetPurchaseRequests(value); return *this;}
168 
172  inline PurchaseScheduledInstancesRequest& WithPurchaseRequests(Aws::Vector<PurchaseRequest>&& value) { SetPurchaseRequests(std::move(value)); return *this;}
173 
177  inline PurchaseScheduledInstancesRequest& AddPurchaseRequests(const PurchaseRequest& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests.push_back(value); return *this; }
178 
182  inline PurchaseScheduledInstancesRequest& AddPurchaseRequests(PurchaseRequest&& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests.push_back(std::move(value)); return *this; }
183 
184  private:
185 
186  Aws::String m_clientToken;
187  bool m_clientTokenHasBeenSet;
188 
189  bool m_dryRun;
190  bool m_dryRunHasBeenSet;
191 
192  Aws::Vector<PurchaseRequest> m_purchaseRequests;
193  bool m_purchaseRequestsHasBeenSet;
194  };
195 
196 } // namespace Model
197 } // namespace EC2
198 } // namespace Aws
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SetPurchaseRequests
void SetPurchaseRequests(const Aws::Vector< PurchaseRequest > &value)
Definition: PurchaseScheduledInstancesRequest.h:157
Aws::EC2::Model::PurchaseScheduledInstancesRequest::WithDryRun
PurchaseScheduledInstancesRequest & WithDryRun(bool value)
Definition: PurchaseScheduledInstancesRequest.h:141
Aws::EC2::Model::PurchaseScheduledInstancesRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: PurchaseScheduledInstancesRequest.h:125
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::PurchaseScheduledInstancesRequest::WithPurchaseRequests
PurchaseScheduledInstancesRequest & WithPurchaseRequests(const Aws::Vector< PurchaseRequest > &value)
Definition: PurchaseScheduledInstancesRequest.h:167
Aws::EC2::Model::PurchaseScheduledInstancesRequest::PurchaseScheduledInstancesRequest
PurchaseScheduledInstancesRequest()
Aws::EC2::Model::PurchaseRequest
Definition: PurchaseRequest.h:33
Aws::EC2::Model::PurchaseScheduledInstancesRequest::GetPurchaseRequests
const Aws::Vector< PurchaseRequest > & GetPurchaseRequests() const
Definition: PurchaseScheduledInstancesRequest.h:147
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::PurchaseScheduledInstancesRequest::AddPurchaseRequests
PurchaseScheduledInstancesRequest & AddPurchaseRequests(const PurchaseRequest &value)
Definition: PurchaseScheduledInstancesRequest.h:177
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SetClientToken
void SetClientToken(const Aws::String &value)
Definition: PurchaseScheduledInstancesRequest.h:68
Aws::EC2::Model::PurchaseScheduledInstancesRequest::WithPurchaseRequests
PurchaseScheduledInstancesRequest & WithPurchaseRequests(Aws::Vector< PurchaseRequest > &&value)
Definition: PurchaseScheduledInstancesRequest.h:172
AWSVector.h
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::PurchaseScheduledInstancesRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: PurchaseScheduledInstancesRequest.h:37
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SetClientToken
void SetClientToken(Aws::String &&value)
Definition: PurchaseScheduledInstancesRequest.h:76
Aws::EC2::Model::PurchaseScheduledInstancesRequest::GetClientToken
const Aws::String & GetClientToken() const
Definition: PurchaseScheduledInstancesRequest.h:52
EC2Request.h
Aws::EC2::Model::PurchaseScheduledInstancesRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWSString.h
Aws::EC2::Model::PurchaseScheduledInstancesRequest::WithClientToken
PurchaseScheduledInstancesRequest & WithClientToken(Aws::String &&value)
Definition: PurchaseScheduledInstancesRequest.h:100
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SetClientToken
void SetClientToken(const char *value)
Definition: PurchaseScheduledInstancesRequest.h:84
Aws::EC2::Model::PurchaseScheduledInstancesRequest
Definition: PurchaseScheduledInstancesRequest.h:29
Aws::EC2::Model::PurchaseScheduledInstancesRequest::PurchaseRequestsHasBeenSet
bool PurchaseRequestsHasBeenSet() const
Definition: PurchaseScheduledInstancesRequest.h:152
Aws::EC2::Model::PurchaseScheduledInstancesRequest::WithClientToken
PurchaseScheduledInstancesRequest & WithClientToken(const char *value)
Definition: PurchaseScheduledInstancesRequest.h:108
Aws
Definition: AccessManagementClient.h:15
PurchaseRequest.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SetPurchaseRequests
void SetPurchaseRequests(Aws::Vector< PurchaseRequest > &&value)
Definition: PurchaseScheduledInstancesRequest.h:162
Aws::EC2::Model::PurchaseScheduledInstancesRequest::AddPurchaseRequests
PurchaseScheduledInstancesRequest & AddPurchaseRequests(PurchaseRequest &&value)
Definition: PurchaseScheduledInstancesRequest.h:182
UUID.h
Aws::EC2::Model::PurchaseScheduledInstancesRequest::ClientTokenHasBeenSet
bool ClientTokenHasBeenSet() const
Definition: PurchaseScheduledInstancesRequest.h:60
EC2_EXPORTS.h
Aws::EC2::Model::PurchaseScheduledInstancesRequest::GetDryRun
bool GetDryRun() const
Definition: PurchaseScheduledInstancesRequest.h:117
Aws::EC2::Model::PurchaseScheduledInstancesRequest::WithClientToken
PurchaseScheduledInstancesRequest & WithClientToken(const Aws::String &value)
Definition: PurchaseScheduledInstancesRequest.h:92
Aws::EC2::Model::PurchaseScheduledInstancesRequest::SetDryRun
void SetDryRun(bool value)
Definition: PurchaseScheduledInstancesRequest.h:133