1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ec2/EC2_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/ec2/model/InstanceType.h> 11 #include <aws/ec2/model/RIProductDescription.h> 12 #include <aws/core/utils/DateTime.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace Utils 18 { 19 namespace Xml 20 { 21 class XmlNode; 22 } // namespace Xml 23 } // namespace Utils 24 namespace EC2 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>Describes the maximum price per hour that you are willing to pay for a Spot 31 * Instance.</p><p><h3>See Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotPrice">AWS API 33 * Reference</a></p> 34 */ 35 class AWS_EC2_API SpotPrice 36 { 37 public: 38 SpotPrice(); 39 SpotPrice(const Aws::Utils::Xml::XmlNode& xmlNode); 40 SpotPrice& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 41 42 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 43 void OutputToStream(Aws::OStream& oStream, const char* location) const; 44 45 46 /** 47 * <p>The Availability Zone.</p> 48 */ GetAvailabilityZone()49 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } 50 51 /** 52 * <p>The Availability Zone.</p> 53 */ AvailabilityZoneHasBeenSet()54 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } 55 56 /** 57 * <p>The Availability Zone.</p> 58 */ SetAvailabilityZone(const Aws::String & value)59 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } 60 61 /** 62 * <p>The Availability Zone.</p> 63 */ SetAvailabilityZone(Aws::String && value)64 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } 65 66 /** 67 * <p>The Availability Zone.</p> 68 */ SetAvailabilityZone(const char * value)69 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } 70 71 /** 72 * <p>The Availability Zone.</p> 73 */ WithAvailabilityZone(const Aws::String & value)74 inline SpotPrice& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} 75 76 /** 77 * <p>The Availability Zone.</p> 78 */ WithAvailabilityZone(Aws::String && value)79 inline SpotPrice& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} 80 81 /** 82 * <p>The Availability Zone.</p> 83 */ WithAvailabilityZone(const char * value)84 inline SpotPrice& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} 85 86 87 /** 88 * <p>The instance type.</p> 89 */ GetInstanceType()90 inline const InstanceType& GetInstanceType() const{ return m_instanceType; } 91 92 /** 93 * <p>The instance type.</p> 94 */ InstanceTypeHasBeenSet()95 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } 96 97 /** 98 * <p>The instance type.</p> 99 */ SetInstanceType(const InstanceType & value)100 inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } 101 102 /** 103 * <p>The instance type.</p> 104 */ SetInstanceType(InstanceType && value)105 inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } 106 107 /** 108 * <p>The instance type.</p> 109 */ WithInstanceType(const InstanceType & value)110 inline SpotPrice& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;} 111 112 /** 113 * <p>The instance type.</p> 114 */ WithInstanceType(InstanceType && value)115 inline SpotPrice& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;} 116 117 118 /** 119 * <p>A general description of the AMI.</p> 120 */ GetProductDescription()121 inline const RIProductDescription& GetProductDescription() const{ return m_productDescription; } 122 123 /** 124 * <p>A general description of the AMI.</p> 125 */ ProductDescriptionHasBeenSet()126 inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; } 127 128 /** 129 * <p>A general description of the AMI.</p> 130 */ SetProductDescription(const RIProductDescription & value)131 inline void SetProductDescription(const RIProductDescription& value) { m_productDescriptionHasBeenSet = true; m_productDescription = value; } 132 133 /** 134 * <p>A general description of the AMI.</p> 135 */ SetProductDescription(RIProductDescription && value)136 inline void SetProductDescription(RIProductDescription&& value) { m_productDescriptionHasBeenSet = true; m_productDescription = std::move(value); } 137 138 /** 139 * <p>A general description of the AMI.</p> 140 */ WithProductDescription(const RIProductDescription & value)141 inline SpotPrice& WithProductDescription(const RIProductDescription& value) { SetProductDescription(value); return *this;} 142 143 /** 144 * <p>A general description of the AMI.</p> 145 */ WithProductDescription(RIProductDescription && value)146 inline SpotPrice& WithProductDescription(RIProductDescription&& value) { SetProductDescription(std::move(value)); return *this;} 147 148 149 /** 150 * <p>The maximum price per hour that you are willing to pay for a Spot 151 * Instance.</p> 152 */ GetSpotPrice()153 inline const Aws::String& GetSpotPrice() const{ return m_spotPrice; } 154 155 /** 156 * <p>The maximum price per hour that you are willing to pay for a Spot 157 * Instance.</p> 158 */ SpotPriceHasBeenSet()159 inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; } 160 161 /** 162 * <p>The maximum price per hour that you are willing to pay for a Spot 163 * Instance.</p> 164 */ SetSpotPrice(const Aws::String & value)165 inline void SetSpotPrice(const Aws::String& value) { m_spotPriceHasBeenSet = true; m_spotPrice = value; } 166 167 /** 168 * <p>The maximum price per hour that you are willing to pay for a Spot 169 * Instance.</p> 170 */ SetSpotPrice(Aws::String && value)171 inline void SetSpotPrice(Aws::String&& value) { m_spotPriceHasBeenSet = true; m_spotPrice = std::move(value); } 172 173 /** 174 * <p>The maximum price per hour that you are willing to pay for a Spot 175 * Instance.</p> 176 */ SetSpotPrice(const char * value)177 inline void SetSpotPrice(const char* value) { m_spotPriceHasBeenSet = true; m_spotPrice.assign(value); } 178 179 /** 180 * <p>The maximum price per hour that you are willing to pay for a Spot 181 * Instance.</p> 182 */ WithSpotPrice(const Aws::String & value)183 inline SpotPrice& WithSpotPrice(const Aws::String& value) { SetSpotPrice(value); return *this;} 184 185 /** 186 * <p>The maximum price per hour that you are willing to pay for a Spot 187 * Instance.</p> 188 */ WithSpotPrice(Aws::String && value)189 inline SpotPrice& WithSpotPrice(Aws::String&& value) { SetSpotPrice(std::move(value)); return *this;} 190 191 /** 192 * <p>The maximum price per hour that you are willing to pay for a Spot 193 * Instance.</p> 194 */ WithSpotPrice(const char * value)195 inline SpotPrice& WithSpotPrice(const char* value) { SetSpotPrice(value); return *this;} 196 197 198 /** 199 * <p>The date and time the request was created, in UTC format (for example, 200 * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> 201 */ GetTimestamp()202 inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; } 203 204 /** 205 * <p>The date and time the request was created, in UTC format (for example, 206 * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> 207 */ TimestampHasBeenSet()208 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } 209 210 /** 211 * <p>The date and time the request was created, in UTC format (for example, 212 * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> 213 */ SetTimestamp(const Aws::Utils::DateTime & value)214 inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; } 215 216 /** 217 * <p>The date and time the request was created, in UTC format (for example, 218 * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> 219 */ SetTimestamp(Aws::Utils::DateTime && value)220 inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } 221 222 /** 223 * <p>The date and time the request was created, in UTC format (for example, 224 * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> 225 */ WithTimestamp(const Aws::Utils::DateTime & value)226 inline SpotPrice& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;} 227 228 /** 229 * <p>The date and time the request was created, in UTC format (for example, 230 * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> 231 */ WithTimestamp(Aws::Utils::DateTime && value)232 inline SpotPrice& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;} 233 234 private: 235 236 Aws::String m_availabilityZone; 237 bool m_availabilityZoneHasBeenSet; 238 239 InstanceType m_instanceType; 240 bool m_instanceTypeHasBeenSet; 241 242 RIProductDescription m_productDescription; 243 bool m_productDescriptionHasBeenSet; 244 245 Aws::String m_spotPrice; 246 bool m_spotPriceHasBeenSet; 247 248 Aws::Utils::DateTime m_timestamp; 249 bool m_timestampHasBeenSet; 250 }; 251 252 } // namespace Model 253 } // namespace EC2 254 } // namespace Aws 255