AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PurchaseCapacityBlockRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/CapacityReservationInstancePlatform.h>
12#include <aws/ec2/model/TagSpecification.h>
13#include <utility>
14
15namespace Aws
16{
17namespace EC2
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_EC2_API PurchaseCapacityBlockRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "PurchaseCapacityBlock"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39
40 public:
41
43
49 inline bool GetDryRun() const { return m_dryRun; }
50 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
51 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
52 inline PurchaseCapacityBlockRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
54
56
59 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
60 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
61 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
62 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
63 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
64 PurchaseCapacityBlockRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
65 template<typename TagSpecificationsT = TagSpecification>
66 PurchaseCapacityBlockRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
68
70
73 inline const Aws::String& GetCapacityBlockOfferingId() const { return m_capacityBlockOfferingId; }
74 inline bool CapacityBlockOfferingIdHasBeenSet() const { return m_capacityBlockOfferingIdHasBeenSet; }
75 template<typename CapacityBlockOfferingIdT = Aws::String>
76 void SetCapacityBlockOfferingId(CapacityBlockOfferingIdT&& value) { m_capacityBlockOfferingIdHasBeenSet = true; m_capacityBlockOfferingId = std::forward<CapacityBlockOfferingIdT>(value); }
77 template<typename CapacityBlockOfferingIdT = Aws::String>
78 PurchaseCapacityBlockRequest& WithCapacityBlockOfferingId(CapacityBlockOfferingIdT&& value) { SetCapacityBlockOfferingId(std::forward<CapacityBlockOfferingIdT>(value)); return *this;}
80
82
85 inline CapacityReservationInstancePlatform GetInstancePlatform() const { return m_instancePlatform; }
86 inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; }
87 inline void SetInstancePlatform(CapacityReservationInstancePlatform value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = value; }
90 private:
91
92 bool m_dryRun{false};
93 bool m_dryRunHasBeenSet = false;
94
95 Aws::Vector<TagSpecification> m_tagSpecifications;
96 bool m_tagSpecificationsHasBeenSet = false;
97
98 Aws::String m_capacityBlockOfferingId;
99 bool m_capacityBlockOfferingIdHasBeenSet = false;
100
102 bool m_instancePlatformHasBeenSet = false;
103 };
104
105} // namespace Model
106} // namespace EC2
107} // namespace Aws
PurchaseCapacityBlockRequest & WithCapacityBlockOfferingId(CapacityBlockOfferingIdT &&value)
PurchaseCapacityBlockRequest & AddTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API PurchaseCapacityBlockRequest()=default
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetInstancePlatform(CapacityReservationInstancePlatform value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CapacityReservationInstancePlatform GetInstancePlatform() const
PurchaseCapacityBlockRequest & WithDryRun(bool value)
PurchaseCapacityBlockRequest & WithInstancePlatform(CapacityReservationInstancePlatform value)
PurchaseCapacityBlockRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
void SetCapacityBlockOfferingId(CapacityBlockOfferingIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector