AWS SDK for C++  1.9.15
AWS SDK for C++
ModifyCapacityReservationRequest.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 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "ModifyCapacityReservation"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
44  inline const Aws::String& GetCapacityReservationId() const{ return m_capacityReservationId; }
45 
49  inline bool CapacityReservationIdHasBeenSet() const { return m_capacityReservationIdHasBeenSet; }
50 
54  inline void SetCapacityReservationId(const Aws::String& value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId = value; }
55 
59  inline void SetCapacityReservationId(Aws::String&& value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId = std::move(value); }
60 
64  inline void SetCapacityReservationId(const char* value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId.assign(value); }
65 
69  inline ModifyCapacityReservationRequest& WithCapacityReservationId(const Aws::String& value) { SetCapacityReservationId(value); return *this;}
70 
74  inline ModifyCapacityReservationRequest& WithCapacityReservationId(Aws::String&& value) { SetCapacityReservationId(std::move(value)); return *this;}
75 
79  inline ModifyCapacityReservationRequest& WithCapacityReservationId(const char* value) { SetCapacityReservationId(value); return *this;}
80 
81 
85  inline int GetInstanceCount() const{ return m_instanceCount; }
86 
90  inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
91 
95  inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
96 
100  inline ModifyCapacityReservationRequest& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
101 
102 
115  inline const Aws::Utils::DateTime& GetEndDate() const{ return m_endDate; }
116 
129  inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; }
130 
143  inline void SetEndDate(const Aws::Utils::DateTime& value) { m_endDateHasBeenSet = true; m_endDate = value; }
144 
157  inline void SetEndDate(Aws::Utils::DateTime&& value) { m_endDateHasBeenSet = true; m_endDate = std::move(value); }
158 
171  inline ModifyCapacityReservationRequest& WithEndDate(const Aws::Utils::DateTime& value) { SetEndDate(value); return *this;}
172 
185  inline ModifyCapacityReservationRequest& WithEndDate(Aws::Utils::DateTime&& value) { SetEndDate(std::move(value)); return *this;}
186 
187 
198  inline const EndDateType& GetEndDateType() const{ return m_endDateType; }
199 
210  inline bool EndDateTypeHasBeenSet() const { return m_endDateTypeHasBeenSet; }
211 
222  inline void SetEndDateType(const EndDateType& value) { m_endDateTypeHasBeenSet = true; m_endDateType = value; }
223 
234  inline void SetEndDateType(EndDateType&& value) { m_endDateTypeHasBeenSet = true; m_endDateType = std::move(value); }
235 
246  inline ModifyCapacityReservationRequest& WithEndDateType(const EndDateType& value) { SetEndDateType(value); return *this;}
247 
258  inline ModifyCapacityReservationRequest& WithEndDateType(EndDateType&& value) { SetEndDateType(std::move(value)); return *this;}
259 
260 
264  inline bool GetAccept() const{ return m_accept; }
265 
269  inline bool AcceptHasBeenSet() const { return m_acceptHasBeenSet; }
270 
274  inline void SetAccept(bool value) { m_acceptHasBeenSet = true; m_accept = value; }
275 
279  inline ModifyCapacityReservationRequest& WithAccept(bool value) { SetAccept(value); return *this;}
280 
281 
288  inline bool GetDryRun() const{ return m_dryRun; }
289 
296  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
297 
304  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
305 
312  inline ModifyCapacityReservationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
313 
314  private:
315 
316  Aws::String m_capacityReservationId;
317  bool m_capacityReservationIdHasBeenSet;
318 
319  int m_instanceCount;
320  bool m_instanceCountHasBeenSet;
321 
322  Aws::Utils::DateTime m_endDate;
323  bool m_endDateHasBeenSet;
324 
325  EndDateType m_endDateType;
326  bool m_endDateTypeHasBeenSet;
327 
328  bool m_accept;
329  bool m_acceptHasBeenSet;
330 
331  bool m_dryRun;
332  bool m_dryRunHasBeenSet;
333  };
334 
335 } // namespace Model
336 } // namespace EC2
337 } // namespace Aws
Aws::Utils::DateTime
Definition: DateTime.h:55
Aws::EC2::Model::ModifyCapacityReservationRequest::SetEndDateType
void SetEndDateType(EndDateType &&value)
Definition: ModifyCapacityReservationRequest.h:234
Aws::EC2::Model::ModifyCapacityReservationRequest::GetInstanceCount
int GetInstanceCount() const
Definition: ModifyCapacityReservationRequest.h:85
Aws::EC2::Model::ModifyCapacityReservationRequest::GetDryRun
bool GetDryRun() const
Definition: ModifyCapacityReservationRequest.h:288
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::ModifyCapacityReservationRequest::SetEndDate
void SetEndDate(const Aws::Utils::DateTime &value)
Definition: ModifyCapacityReservationRequest.h:143
Aws::EC2::Model::ModifyCapacityReservationRequest::CapacityReservationIdHasBeenSet
bool CapacityReservationIdHasBeenSet() const
Definition: ModifyCapacityReservationRequest.h:49
Aws::EC2::Model::ModifyCapacityReservationRequest::GetEndDate
const Aws::Utils::DateTime & GetEndDate() const
Definition: ModifyCapacityReservationRequest.h:115
DateTime.h
Aws::EC2::Model::ModifyCapacityReservationRequest::AcceptHasBeenSet
bool AcceptHasBeenSet() const
Definition: ModifyCapacityReservationRequest.h:269
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::EndDateType
EndDateType
Definition: EndDateType.h:17
EndDateType.h
Aws::EC2::Model::ModifyCapacityReservationRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::ModifyCapacityReservationRequest::WithAccept
ModifyCapacityReservationRequest & WithAccept(bool value)
Definition: ModifyCapacityReservationRequest.h:279
Aws::EC2::Model::ModifyCapacityReservationRequest::WithCapacityReservationId
ModifyCapacityReservationRequest & WithCapacityReservationId(Aws::String &&value)
Definition: ModifyCapacityReservationRequest.h:74
Aws::EC2::Model::ModifyCapacityReservationRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: ModifyCapacityReservationRequest.h:296
Aws::EC2::Model::ModifyCapacityReservationRequest::SetDryRun
void SetDryRun(bool value)
Definition: ModifyCapacityReservationRequest.h:304
Aws::EC2::Model::ModifyCapacityReservationRequest::SetEndDateType
void SetEndDateType(const EndDateType &value)
Definition: ModifyCapacityReservationRequest.h:222
Aws::EC2::Model::ModifyCapacityReservationRequest::GetEndDateType
const EndDateType & GetEndDateType() const
Definition: ModifyCapacityReservationRequest.h:198
Aws::EC2::Model::ModifyCapacityReservationRequest::SetInstanceCount
void SetInstanceCount(int value)
Definition: ModifyCapacityReservationRequest.h:95
Aws::EC2::Model::ModifyCapacityReservationRequest::WithCapacityReservationId
ModifyCapacityReservationRequest & WithCapacityReservationId(const char *value)
Definition: ModifyCapacityReservationRequest.h:79
Aws::EC2::Model::ModifyCapacityReservationRequest::WithEndDateType
ModifyCapacityReservationRequest & WithEndDateType(const EndDateType &value)
Definition: ModifyCapacityReservationRequest.h:246
Aws::EC2::Model::ModifyCapacityReservationRequest::SetEndDate
void SetEndDate(Aws::Utils::DateTime &&value)
Definition: ModifyCapacityReservationRequest.h:157
EC2Request.h
Aws::EC2::Model::ModifyCapacityReservationRequest::InstanceCountHasBeenSet
bool InstanceCountHasBeenSet() const
Definition: ModifyCapacityReservationRequest.h:90
Aws::EC2::Model::ModifyCapacityReservationRequest::SetCapacityReservationId
void SetCapacityReservationId(const Aws::String &value)
Definition: ModifyCapacityReservationRequest.h:54
AWSString.h
Aws::EC2::Model::ModifyCapacityReservationRequest::WithEndDate
ModifyCapacityReservationRequest & WithEndDate(Aws::Utils::DateTime &&value)
Definition: ModifyCapacityReservationRequest.h:185
Aws::EC2::Model::ModifyCapacityReservationRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: ModifyCapacityReservationRequest.h:32
Aws::EC2::Model::ModifyCapacityReservationRequest::SetCapacityReservationId
void SetCapacityReservationId(Aws::String &&value)
Definition: ModifyCapacityReservationRequest.h:59
Aws::EC2::Model::ModifyCapacityReservationRequest::GetCapacityReservationId
const Aws::String & GetCapacityReservationId() const
Definition: ModifyCapacityReservationRequest.h:44
Aws::EC2::Model::ModifyCapacityReservationRequest::WithInstanceCount
ModifyCapacityReservationRequest & WithInstanceCount(int value)
Definition: ModifyCapacityReservationRequest.h:100
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::ModifyCapacityReservationRequest::WithEndDate
ModifyCapacityReservationRequest & WithEndDate(const Aws::Utils::DateTime &value)
Definition: ModifyCapacityReservationRequest.h:171
Aws::EC2::Model::ModifyCapacityReservationRequest::SetAccept
void SetAccept(bool value)
Definition: ModifyCapacityReservationRequest.h:274
Aws::EC2::Model::ModifyCapacityReservationRequest::EndDateTypeHasBeenSet
bool EndDateTypeHasBeenSet() const
Definition: ModifyCapacityReservationRequest.h:210
Aws::EC2::Model::ModifyCapacityReservationRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::ModifyCapacityReservationRequest::WithCapacityReservationId
ModifyCapacityReservationRequest & WithCapacityReservationId(const Aws::String &value)
Definition: ModifyCapacityReservationRequest.h:69
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::ModifyCapacityReservationRequest::GetAccept
bool GetAccept() const
Definition: ModifyCapacityReservationRequest.h:264
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::ModifyCapacityReservationRequest::WithDryRun
ModifyCapacityReservationRequest & WithDryRun(bool value)
Definition: ModifyCapacityReservationRequest.h:312
Aws::EC2::Model::ModifyCapacityReservationRequest::ModifyCapacityReservationRequest
ModifyCapacityReservationRequest()
Aws::EC2::Model::ModifyCapacityReservationRequest::EndDateHasBeenSet
bool EndDateHasBeenSet() const
Definition: ModifyCapacityReservationRequest.h:129
EC2_EXPORTS.h
Aws::EC2::Model::ModifyCapacityReservationRequest::SetCapacityReservationId
void SetCapacityReservationId(const char *value)
Definition: ModifyCapacityReservationRequest.h:64
Aws::EC2::Model::ModifyCapacityReservationRequest
Definition: ModifyCapacityReservationRequest.h:24
Aws::EC2::Model::ModifyCapacityReservationRequest::WithEndDateType
ModifyCapacityReservationRequest & WithEndDateType(EndDateType &&value)
Definition: ModifyCapacityReservationRequest.h:258