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

Describes the market (purchasing) option for the instances.

See * Also:

AWS * API Reference

*/ class InstanceMarketOptionsRequest { public: AWS_EC2_API InstanceMarketOptionsRequest(); AWS_EC2_API InstanceMarketOptionsRequest(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API InstanceMarketOptionsRequest& 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 market type.

*/ inline const MarketType& GetMarketType() const{ return m_marketType; } /** *

The market type.

*/ inline bool MarketTypeHasBeenSet() const { return m_marketTypeHasBeenSet; } /** *

The market type.

*/ inline void SetMarketType(const MarketType& value) { m_marketTypeHasBeenSet = true; m_marketType = value; } /** *

The market type.

*/ inline void SetMarketType(MarketType&& value) { m_marketTypeHasBeenSet = true; m_marketType = std::move(value); } /** *

The market type.

*/ inline InstanceMarketOptionsRequest& WithMarketType(const MarketType& value) { SetMarketType(value); return *this;} /** *

The market type.

*/ inline InstanceMarketOptionsRequest& WithMarketType(MarketType&& value) { SetMarketType(std::move(value)); return *this;} /** *

The options for Spot Instances.

*/ inline const SpotMarketOptions& GetSpotOptions() const{ return m_spotOptions; } /** *

The options for Spot Instances.

*/ inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; } /** *

The options for Spot Instances.

*/ inline void SetSpotOptions(const SpotMarketOptions& value) { m_spotOptionsHasBeenSet = true; m_spotOptions = value; } /** *

The options for Spot Instances.

*/ inline void SetSpotOptions(SpotMarketOptions&& value) { m_spotOptionsHasBeenSet = true; m_spotOptions = std::move(value); } /** *

The options for Spot Instances.

*/ inline InstanceMarketOptionsRequest& WithSpotOptions(const SpotMarketOptions& value) { SetSpotOptions(value); return *this;} /** *

The options for Spot Instances.

*/ inline InstanceMarketOptionsRequest& WithSpotOptions(SpotMarketOptions&& value) { SetSpotOptions(std::move(value)); return *this;} private: MarketType m_marketType; bool m_marketTypeHasBeenSet = false; SpotMarketOptions m_spotOptions; bool m_spotOptionsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws