AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ModifyFleetRequest.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/FleetExcessCapacityTerminationPolicy.h>
12#include <aws/ec2/model/FleetLaunchTemplateConfigRequest.h>
13#include <aws/ec2/model/TargetCapacitySpecificationRequest.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
24 public:
25 AWS_EC2_API ModifyFleetRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "ModifyFleet"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
46 inline bool GetDryRun() const { return m_dryRun; }
47 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
48 inline void SetDryRun(bool value) {
49 m_dryRunHasBeenSet = true;
50 m_dryRun = value;
51 }
52 inline ModifyFleetRequest& WithDryRun(bool value) {
53 SetDryRun(value);
54 return *this;
55 }
57
59
64 inline FleetExcessCapacityTerminationPolicy GetExcessCapacityTerminationPolicy() const { return m_excessCapacityTerminationPolicy; }
65 inline bool ExcessCapacityTerminationPolicyHasBeenSet() const { return m_excessCapacityTerminationPolicyHasBeenSet; }
67 m_excessCapacityTerminationPolicyHasBeenSet = true;
68 m_excessCapacityTerminationPolicy = value;
69 }
72 return *this;
73 }
75
77
80 inline const Aws::Vector<FleetLaunchTemplateConfigRequest>& GetLaunchTemplateConfigs() const { return m_launchTemplateConfigs; }
81 inline bool LaunchTemplateConfigsHasBeenSet() const { return m_launchTemplateConfigsHasBeenSet; }
82 template <typename LaunchTemplateConfigsT = Aws::Vector<FleetLaunchTemplateConfigRequest>>
83 void SetLaunchTemplateConfigs(LaunchTemplateConfigsT&& value) {
84 m_launchTemplateConfigsHasBeenSet = true;
85 m_launchTemplateConfigs = std::forward<LaunchTemplateConfigsT>(value);
86 }
87 template <typename LaunchTemplateConfigsT = Aws::Vector<FleetLaunchTemplateConfigRequest>>
88 ModifyFleetRequest& WithLaunchTemplateConfigs(LaunchTemplateConfigsT&& value) {
89 SetLaunchTemplateConfigs(std::forward<LaunchTemplateConfigsT>(value));
90 return *this;
91 }
92 template <typename LaunchTemplateConfigsT = FleetLaunchTemplateConfigRequest>
93 ModifyFleetRequest& AddLaunchTemplateConfigs(LaunchTemplateConfigsT&& value) {
94 m_launchTemplateConfigsHasBeenSet = true;
95 m_launchTemplateConfigs.emplace_back(std::forward<LaunchTemplateConfigsT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::String& GetFleetId() const { return m_fleetId; }
105 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
106 template <typename FleetIdT = Aws::String>
107 void SetFleetId(FleetIdT&& value) {
108 m_fleetIdHasBeenSet = true;
109 m_fleetId = std::forward<FleetIdT>(value);
110 }
111 template <typename FleetIdT = Aws::String>
112 ModifyFleetRequest& WithFleetId(FleetIdT&& value) {
113 SetFleetId(std::forward<FleetIdT>(value));
114 return *this;
115 }
117
119
122 inline const TargetCapacitySpecificationRequest& GetTargetCapacitySpecification() const { return m_targetCapacitySpecification; }
123 inline bool TargetCapacitySpecificationHasBeenSet() const { return m_targetCapacitySpecificationHasBeenSet; }
124 template <typename TargetCapacitySpecificationT = TargetCapacitySpecificationRequest>
125 void SetTargetCapacitySpecification(TargetCapacitySpecificationT&& value) {
126 m_targetCapacitySpecificationHasBeenSet = true;
127 m_targetCapacitySpecification = std::forward<TargetCapacitySpecificationT>(value);
128 }
129 template <typename TargetCapacitySpecificationT = TargetCapacitySpecificationRequest>
130 ModifyFleetRequest& WithTargetCapacitySpecification(TargetCapacitySpecificationT&& value) {
131 SetTargetCapacitySpecification(std::forward<TargetCapacitySpecificationT>(value));
132 return *this;
133 }
135
137
140 inline const Aws::String& GetContext() const { return m_context; }
141 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
142 template <typename ContextT = Aws::String>
143 void SetContext(ContextT&& value) {
144 m_contextHasBeenSet = true;
145 m_context = std::forward<ContextT>(value);
146 }
147 template <typename ContextT = Aws::String>
148 ModifyFleetRequest& WithContext(ContextT&& value) {
149 SetContext(std::forward<ContextT>(value));
150 return *this;
151 }
153 private:
154 bool m_dryRun{false};
155
157
158 Aws::Vector<FleetLaunchTemplateConfigRequest> m_launchTemplateConfigs;
159
160 Aws::String m_fleetId;
161
162 TargetCapacitySpecificationRequest m_targetCapacitySpecification;
163
164 Aws::String m_context;
165 bool m_dryRunHasBeenSet = false;
166 bool m_excessCapacityTerminationPolicyHasBeenSet = false;
167 bool m_launchTemplateConfigsHasBeenSet = false;
168 bool m_fleetIdHasBeenSet = false;
169 bool m_targetCapacitySpecificationHasBeenSet = false;
170 bool m_contextHasBeenSet = false;
171};
172
173} // namespace Model
174} // namespace EC2
175} // namespace Aws
ModifyFleetRequest & WithDryRun(bool value)
void SetTargetCapacitySpecification(TargetCapacitySpecificationT &&value)
ModifyFleetRequest & WithFleetId(FleetIdT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWS_EC2_API ModifyFleetRequest()=default
AWS_EC2_API Aws::String SerializePayload() const override
ModifyFleetRequest & WithContext(ContextT &&value)
ModifyFleetRequest & WithExcessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy value)
const Aws::Vector< FleetLaunchTemplateConfigRequest > & GetLaunchTemplateConfigs() const
ModifyFleetRequest & WithTargetCapacitySpecification(TargetCapacitySpecificationT &&value)
void SetExcessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy value)
ModifyFleetRequest & WithLaunchTemplateConfigs(LaunchTemplateConfigsT &&value)
FleetExcessCapacityTerminationPolicy GetExcessCapacityTerminationPolicy() const
const Aws::String & GetFleetId() const
ModifyFleetRequest & AddLaunchTemplateConfigs(LaunchTemplateConfigsT &&value)
void SetLaunchTemplateConfigs(LaunchTemplateConfigsT &&value)
const TargetCapacitySpecificationRequest & GetTargetCapacitySpecification() const
virtual const char * GetServiceRequestName() const override
const Aws::String & GetContext() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector