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

Context information that enables CloudFormation to uniquely identify a * resource. CloudFormation uses context key-value pairs in cases where a * resource's logical and physical IDs aren't enough to uniquely identify that * resource. Each context key-value pair specifies a resource that contains the * targeted resource.

See Also:

AWS * API Reference

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

The resource context key.

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

The resource context key.

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

The resource context key.

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

The resource context key.

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

The resource context key.

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

The resource context key.

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

The resource context key.

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

The resource context key.

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

The resource context value.

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

The resource context value.

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

The resource context value.

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

The resource context value.

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

The resource context value.

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

The resource context value.

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

The resource context value.

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

The resource context value.

*/ inline PhysicalResourceIdContextKeyValuePair& WithValue(const char* value) { SetValue(value); return *this;} private: Aws::String m_key; bool m_keyHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; }; } // namespace Model } // namespace CloudFormation } // namespace Aws