/** * 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 Backup { namespace Model { /** *

Contains an array of triplets made up of a condition type (such as * StringEquals), a key, and a value. Used to filter resources using * their tags and assign them to a backup plan. Case sensitive.

See * Also:

AWS * API Reference

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

An operation applied to a key-value pair used to assign resources to your * backup plan. Condition only supports StringEquals. For more * flexible assignment options, including StringLike and the ability * to exclude resources from your backup plan, use Conditions (with an * "s" on the end) for your * BackupSelection .

*/ inline const ConditionType& GetConditionType() const{ return m_conditionType; } /** *

An operation applied to a key-value pair used to assign resources to your * backup plan. Condition only supports StringEquals. For more * flexible assignment options, including StringLike and the ability * to exclude resources from your backup plan, use Conditions (with an * "s" on the end) for your * BackupSelection .

*/ inline bool ConditionTypeHasBeenSet() const { return m_conditionTypeHasBeenSet; } /** *

An operation applied to a key-value pair used to assign resources to your * backup plan. Condition only supports StringEquals. For more * flexible assignment options, including StringLike and the ability * to exclude resources from your backup plan, use Conditions (with an * "s" on the end) for your * BackupSelection .

*/ inline void SetConditionType(const ConditionType& value) { m_conditionTypeHasBeenSet = true; m_conditionType = value; } /** *

An operation applied to a key-value pair used to assign resources to your * backup plan. Condition only supports StringEquals. For more * flexible assignment options, including StringLike and the ability * to exclude resources from your backup plan, use Conditions (with an * "s" on the end) for your * BackupSelection .

*/ inline void SetConditionType(ConditionType&& value) { m_conditionTypeHasBeenSet = true; m_conditionType = std::move(value); } /** *

An operation applied to a key-value pair used to assign resources to your * backup plan. Condition only supports StringEquals. For more * flexible assignment options, including StringLike and the ability * to exclude resources from your backup plan, use Conditions (with an * "s" on the end) for your * BackupSelection .

*/ inline Condition& WithConditionType(const ConditionType& value) { SetConditionType(value); return *this;} /** *

An operation applied to a key-value pair used to assign resources to your * backup plan. Condition only supports StringEquals. For more * flexible assignment options, including StringLike and the ability * to exclude resources from your backup plan, use Conditions (with an * "s" on the end) for your * BackupSelection .

*/ inline Condition& WithConditionType(ConditionType&& value) { SetConditionType(std::move(value)); return *this;} /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline const Aws::String& GetConditionKey() const{ return m_conditionKey; } /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline bool ConditionKeyHasBeenSet() const { return m_conditionKeyHasBeenSet; } /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline void SetConditionKey(const Aws::String& value) { m_conditionKeyHasBeenSet = true; m_conditionKey = value; } /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline void SetConditionKey(Aws::String&& value) { m_conditionKeyHasBeenSet = true; m_conditionKey = std::move(value); } /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline void SetConditionKey(const char* value) { m_conditionKeyHasBeenSet = true; m_conditionKey.assign(value); } /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline Condition& WithConditionKey(const Aws::String& value) { SetConditionKey(value); return *this;} /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline Condition& WithConditionKey(Aws::String&& value) { SetConditionKey(std::move(value)); return *this;} /** *

The key in a key-value pair. For example, in the tag Department: * Accounting, Department is the key.

*/ inline Condition& WithConditionKey(const char* value) { SetConditionKey(value); return *this;} /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline const Aws::String& GetConditionValue() const{ return m_conditionValue; } /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline bool ConditionValueHasBeenSet() const { return m_conditionValueHasBeenSet; } /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline void SetConditionValue(const Aws::String& value) { m_conditionValueHasBeenSet = true; m_conditionValue = value; } /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline void SetConditionValue(Aws::String&& value) { m_conditionValueHasBeenSet = true; m_conditionValue = std::move(value); } /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline void SetConditionValue(const char* value) { m_conditionValueHasBeenSet = true; m_conditionValue.assign(value); } /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline Condition& WithConditionValue(const Aws::String& value) { SetConditionValue(value); return *this;} /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline Condition& WithConditionValue(Aws::String&& value) { SetConditionValue(std::move(value)); return *this;} /** *

The value in a key-value pair. For example, in the tag Department: * Accounting, Accounting is the value.

*/ inline Condition& WithConditionValue(const char* value) { SetConditionValue(value); return *this;} private: ConditionType m_conditionType; bool m_conditionTypeHasBeenSet = false; Aws::String m_conditionKey; bool m_conditionKeyHasBeenSet = false; Aws::String m_conditionValue; bool m_conditionValueHasBeenSet = false; }; } // namespace Model } // namespace Backup } // namespace Aws