/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudWatchEvents { namespace Model { /** *

Information about the EC2 instances that are to be sent the command, * specified as key-value pairs. Each RunCommandTarget block can * include only one key, but this key may specify multiple values.

See * Also:

AWS * API Reference

*/ class RunCommandTarget { public: AWS_CLOUDWATCHEVENTS_API RunCommandTarget(); AWS_CLOUDWATCHEVENTS_API RunCommandTarget(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHEVENTS_API RunCommandTarget& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline const Aws::String& GetKey() const{ return m_key; } /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline RunCommandTarget& WithKey(const Aws::String& value) { SetKey(value); return *this;} /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline RunCommandTarget& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} /** *

Can be either tag: tag-key or * InstanceIds.

*/ inline RunCommandTarget& WithKey(const char* value) { SetKey(value); return *this;} /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline const Aws::Vector& GetValues() const{ return m_values; } /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; } /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline void SetValues(const Aws::Vector& value) { m_valuesHasBeenSet = true; m_values = value; } /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline void SetValues(Aws::Vector&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); } /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline RunCommandTarget& WithValues(const Aws::Vector& value) { SetValues(value); return *this;} /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline RunCommandTarget& WithValues(Aws::Vector&& value) { SetValues(std::move(value)); return *this;} /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline RunCommandTarget& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; } /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline RunCommandTarget& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; } /** *

If Key is tag: tag-key, Values * is a list of tag values. If Key is InstanceIds, * Values is a list of Amazon EC2 instance IDs.

*/ inline RunCommandTarget& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; } private: Aws::String m_key; bool m_keyHasBeenSet = false; Aws::Vector m_values; bool m_valuesHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchEvents } // namespace Aws