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

Specifies the conditions under which data should be updated. If an update * condition is specified for a request, the data will only be updated if the * condition is satisfied. For example, if an attribute with a specific name and * value exists, or if a specific attribute doesn't exist.

See * Also:

AWS * API Reference

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

The name of the attribute involved in the condition.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the attribute involved in the condition.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the attribute involved in the condition.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the attribute involved in the condition.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the attribute involved in the condition.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the attribute involved in the condition.

*/ inline UpdateCondition& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the attribute involved in the condition.

*/ inline UpdateCondition& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the attribute involved in the condition.

*/ inline UpdateCondition& WithName(const char* value) { SetName(value); return *this;} /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline UpdateCondition& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline UpdateCondition& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The value of an attribute. This value can only be specified when the * Exists parameter is equal to true.

*/ inline UpdateCondition& WithValue(const char* value) { SetValue(value); return *this;} /** *

A value specifying whether or not the specified attribute must exist with the * specified value in order for the update condition to be satisfied. Specify * true if the attribute must exist for the update condition to be * satisfied. Specify false if the attribute should not exist in order * for the update condition to be satisfied.

*/ inline bool GetExists() const{ return m_exists; } /** *

A value specifying whether or not the specified attribute must exist with the * specified value in order for the update condition to be satisfied. Specify * true if the attribute must exist for the update condition to be * satisfied. Specify false if the attribute should not exist in order * for the update condition to be satisfied.

*/ inline bool ExistsHasBeenSet() const { return m_existsHasBeenSet; } /** *

A value specifying whether or not the specified attribute must exist with the * specified value in order for the update condition to be satisfied. Specify * true if the attribute must exist for the update condition to be * satisfied. Specify false if the attribute should not exist in order * for the update condition to be satisfied.

*/ inline void SetExists(bool value) { m_existsHasBeenSet = true; m_exists = value; } /** *

A value specifying whether or not the specified attribute must exist with the * specified value in order for the update condition to be satisfied. Specify * true if the attribute must exist for the update condition to be * satisfied. Specify false if the attribute should not exist in order * for the update condition to be satisfied.

*/ inline UpdateCondition& WithExists(bool value) { SetExists(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; bool m_exists; bool m_existsHasBeenSet = false; }; } // namespace Model } // namespace SimpleDB } // namespace Aws