/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

The Spot placement score for this Region or Availability Zone. The score is * calculated based on the assumption that the capacity-optimized * allocation strategy is used and that all of the Availability Zones in the Region * can be used.

See Also:

AWS * API Reference

*/ class SpotPlacementScore { public: AWS_EC2_API SpotPlacementScore(); AWS_EC2_API SpotPlacementScore(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API SpotPlacementScore& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The Region.

*/ inline const Aws::String& GetRegion() const{ return m_region; } /** *

The Region.

*/ inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; } /** *

The Region.

*/ inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; } /** *

The Region.

*/ inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); } /** *

The Region.

*/ inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); } /** *

The Region.

*/ inline SpotPlacementScore& WithRegion(const Aws::String& value) { SetRegion(value); return *this;} /** *

The Region.

*/ inline SpotPlacementScore& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;} /** *

The Region.

*/ inline SpotPlacementScore& WithRegion(const char* value) { SetRegion(value); return *this;} /** *

The Availability Zone.

*/ inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; } /** *

The Availability Zone.

*/ inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; } /** *

The Availability Zone.

*/ inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; } /** *

The Availability Zone.

*/ inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); } /** *

The Availability Zone.

*/ inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); } /** *

The Availability Zone.

*/ inline SpotPlacementScore& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;} /** *

The Availability Zone.

*/ inline SpotPlacementScore& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;} /** *

The Availability Zone.

*/ inline SpotPlacementScore& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;} /** *

The placement score, on a scale from 1 to 10. A * score of 10 indicates that your Spot request is highly likely to * succeed in this Region or Availability Zone. A score of 1 indicates * that your Spot request is not likely to succeed.

*/ inline int GetScore() const{ return m_score; } /** *

The placement score, on a scale from 1 to 10. A * score of 10 indicates that your Spot request is highly likely to * succeed in this Region or Availability Zone. A score of 1 indicates * that your Spot request is not likely to succeed.

*/ inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; } /** *

The placement score, on a scale from 1 to 10. A * score of 10 indicates that your Spot request is highly likely to * succeed in this Region or Availability Zone. A score of 1 indicates * that your Spot request is not likely to succeed.

*/ inline void SetScore(int value) { m_scoreHasBeenSet = true; m_score = value; } /** *

The placement score, on a scale from 1 to 10. A * score of 10 indicates that your Spot request is highly likely to * succeed in this Region or Availability Zone. A score of 1 indicates * that your Spot request is not likely to succeed.

*/ inline SpotPlacementScore& WithScore(int value) { SetScore(value); return *this;} private: Aws::String m_region; bool m_regionHasBeenSet = false; Aws::String m_availabilityZoneId; bool m_availabilityZoneIdHasBeenSet = false; int m_score; bool m_scoreHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws