AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
PurchaseCapacityBlockRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/CapacityReservationInstancePlatform.h>
12#include <aws/ec2/model/TagSpecification.h>
13
14#include <utility>
15
16namespace Aws {
17namespace EC2 {
18namespace Model {
19
23 public:
24 AWS_EC2_API PurchaseCapacityBlockRequest() = default;
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 "PurchaseCapacityBlock"; }
31
32 AWS_EC2_API Aws::String SerializePayload() const override;
33
34 protected:
35 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
36
37 public:
39
45 inline bool GetDryRun() const { return m_dryRun; }
46 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
47 inline void SetDryRun(bool value) {
48 m_dryRunHasBeenSet = true;
49 m_dryRun = value;
50 }
52 SetDryRun(value);
53 return *this;
54 }
56
58
61 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
62 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
63 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
64 void SetTagSpecifications(TagSpecificationsT&& value) {
65 m_tagSpecificationsHasBeenSet = true;
66 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
67 }
68 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
70 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
71 return *this;
72 }
73 template <typename TagSpecificationsT = TagSpecification>
75 m_tagSpecificationsHasBeenSet = true;
76 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::String& GetCapacityBlockOfferingId() const { return m_capacityBlockOfferingId; }
86 inline bool CapacityBlockOfferingIdHasBeenSet() const { return m_capacityBlockOfferingIdHasBeenSet; }
87 template <typename CapacityBlockOfferingIdT = Aws::String>
88 void SetCapacityBlockOfferingId(CapacityBlockOfferingIdT&& value) {
89 m_capacityBlockOfferingIdHasBeenSet = true;
90 m_capacityBlockOfferingId = std::forward<CapacityBlockOfferingIdT>(value);
91 }
92 template <typename CapacityBlockOfferingIdT = Aws::String>
93 PurchaseCapacityBlockRequest& WithCapacityBlockOfferingId(CapacityBlockOfferingIdT&& value) {
94 SetCapacityBlockOfferingId(std::forward<CapacityBlockOfferingIdT>(value));
95 return *this;
96 }
98
100
103 inline CapacityReservationInstancePlatform GetInstancePlatform() const { return m_instancePlatform; }
104 inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; }
106 m_instancePlatformHasBeenSet = true;
107 m_instancePlatform = value;
108 }
110 SetInstancePlatform(value);
111 return *this;
112 }
114 private:
115 bool m_dryRun{false};
116
117 Aws::Vector<TagSpecification> m_tagSpecifications;
118
119 Aws::String m_capacityBlockOfferingId;
120
122 bool m_dryRunHasBeenSet = false;
123 bool m_tagSpecificationsHasBeenSet = false;
124 bool m_capacityBlockOfferingIdHasBeenSet = false;
125 bool m_instancePlatformHasBeenSet = false;
126};
127
128} // namespace Model
129} // namespace EC2
130} // 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