/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace IAM { namespace Model { /** *

Contains information about a condition context key. It includes the name of * the key and specifies the value (or values, if the context key supports multiple * values) to use in the simulation. This information is used when evaluating the * Condition elements of the input policies.

This data type is * used as an input parameter to SimulateCustomPolicy and * SimulatePrincipalPolicy.

See Also:

AWS * API Reference

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

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline const Aws::String& GetContextKeyName() const{ return m_contextKeyName; } /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline bool ContextKeyNameHasBeenSet() const { return m_contextKeyNameHasBeenSet; } /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline void SetContextKeyName(const Aws::String& value) { m_contextKeyNameHasBeenSet = true; m_contextKeyName = value; } /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline void SetContextKeyName(Aws::String&& value) { m_contextKeyNameHasBeenSet = true; m_contextKeyName = std::move(value); } /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline void SetContextKeyName(const char* value) { m_contextKeyNameHasBeenSet = true; m_contextKeyName.assign(value); } /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline ContextEntry& WithContextKeyName(const Aws::String& value) { SetContextKeyName(value); return *this;} /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline ContextEntry& WithContextKeyName(Aws::String&& value) { SetContextKeyName(std::move(value)); return *this;} /** *

The full name of a condition context key, including the service prefix. For * example, aws:SourceIp or s3:VersionId.

*/ inline ContextEntry& WithContextKeyName(const char* value) { SetContextKeyName(value); return *this;} /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline const Aws::Vector& GetContextKeyValues() const{ return m_contextKeyValues; } /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline bool ContextKeyValuesHasBeenSet() const { return m_contextKeyValuesHasBeenSet; } /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline void SetContextKeyValues(const Aws::Vector& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues = value; } /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline void SetContextKeyValues(Aws::Vector&& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues = std::move(value); } /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline ContextEntry& WithContextKeyValues(const Aws::Vector& value) { SetContextKeyValues(value); return *this;} /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline ContextEntry& WithContextKeyValues(Aws::Vector&& value) { SetContextKeyValues(std::move(value)); return *this;} /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline ContextEntry& AddContextKeyValues(const Aws::String& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues.push_back(value); return *this; } /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline ContextEntry& AddContextKeyValues(Aws::String&& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues.push_back(std::move(value)); return *this; } /** *

The value (or values, if the condition context key supports multiple values) * to provide to the simulation when the key is referenced by a * Condition element in an input policy.

*/ inline ContextEntry& AddContextKeyValues(const char* value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues.push_back(value); return *this; } /** *

The data type of the value (or values) specified in the * ContextKeyValues parameter.

*/ inline const ContextKeyTypeEnum& GetContextKeyType() const{ return m_contextKeyType; } /** *

The data type of the value (or values) specified in the * ContextKeyValues parameter.

*/ inline bool ContextKeyTypeHasBeenSet() const { return m_contextKeyTypeHasBeenSet; } /** *

The data type of the value (or values) specified in the * ContextKeyValues parameter.

*/ inline void SetContextKeyType(const ContextKeyTypeEnum& value) { m_contextKeyTypeHasBeenSet = true; m_contextKeyType = value; } /** *

The data type of the value (or values) specified in the * ContextKeyValues parameter.

*/ inline void SetContextKeyType(ContextKeyTypeEnum&& value) { m_contextKeyTypeHasBeenSet = true; m_contextKeyType = std::move(value); } /** *

The data type of the value (or values) specified in the * ContextKeyValues parameter.

*/ inline ContextEntry& WithContextKeyType(const ContextKeyTypeEnum& value) { SetContextKeyType(value); return *this;} /** *

The data type of the value (or values) specified in the * ContextKeyValues parameter.

*/ inline ContextEntry& WithContextKeyType(ContextKeyTypeEnum&& value) { SetContextKeyType(std::move(value)); return *this;} private: Aws::String m_contextKeyName; bool m_contextKeyNameHasBeenSet = false; Aws::Vector m_contextKeyValues; bool m_contextKeyValuesHasBeenSet = false; ContextKeyTypeEnum m_contextKeyType; bool m_contextKeyTypeHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws