/** * 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 target groups to attach to a Spot Fleet. Spot Fleet registers * the running Spot Instances with these target groups.

See Also:

* AWS * API Reference

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

One or more target groups.

*/ inline const Aws::Vector& GetTargetGroups() const{ return m_targetGroups; } /** *

One or more target groups.

*/ inline bool TargetGroupsHasBeenSet() const { return m_targetGroupsHasBeenSet; } /** *

One or more target groups.

*/ inline void SetTargetGroups(const Aws::Vector& value) { m_targetGroupsHasBeenSet = true; m_targetGroups = value; } /** *

One or more target groups.

*/ inline void SetTargetGroups(Aws::Vector&& value) { m_targetGroupsHasBeenSet = true; m_targetGroups = std::move(value); } /** *

One or more target groups.

*/ inline TargetGroupsConfig& WithTargetGroups(const Aws::Vector& value) { SetTargetGroups(value); return *this;} /** *

One or more target groups.

*/ inline TargetGroupsConfig& WithTargetGroups(Aws::Vector&& value) { SetTargetGroups(std::move(value)); return *this;} /** *

One or more target groups.

*/ inline TargetGroupsConfig& AddTargetGroups(const TargetGroup& value) { m_targetGroupsHasBeenSet = true; m_targetGroups.push_back(value); return *this; } /** *

One or more target groups.

*/ inline TargetGroupsConfig& AddTargetGroups(TargetGroup&& value) { m_targetGroupsHasBeenSet = true; m_targetGroups.push_back(std::move(value)); return *this; } private: Aws::Vector m_targetGroups; bool m_targetGroupsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws