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

Contains additional details about the context of the request. Verified * Permissions evaluates this information in an authorization request as part of * the when and unless clauses in a policy.

This * data type is used as a request parameter for the IsAuthorized * and IsAuthorizedWithToken * operations.

Example: * "context":{"Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}} *

See Also:

AWS * API Reference

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

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline const Aws::Map& GetContextMap() const{ return m_contextMap; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline bool ContextMapHasBeenSet() const { return m_contextMapHasBeenSet; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline void SetContextMap(const Aws::Map& value) { m_contextMapHasBeenSet = true; m_contextMap = value; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline void SetContextMap(Aws::Map&& value) { m_contextMapHasBeenSet = true; m_contextMap = std::move(value); } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& WithContextMap(const Aws::Map& value) { SetContextMap(value); return *this;} /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& WithContextMap(Aws::Map&& value) { SetContextMap(std::move(value)); return *this;} /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& AddContextMap(const Aws::String& key, const AttributeValue& value) { m_contextMapHasBeenSet = true; m_contextMap.emplace(key, value); return *this; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& AddContextMap(Aws::String&& key, const AttributeValue& value) { m_contextMapHasBeenSet = true; m_contextMap.emplace(std::move(key), value); return *this; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& AddContextMap(const Aws::String& key, AttributeValue&& value) { m_contextMapHasBeenSet = true; m_contextMap.emplace(key, std::move(value)); return *this; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& AddContextMap(Aws::String&& key, AttributeValue&& value) { m_contextMapHasBeenSet = true; m_contextMap.emplace(std::move(key), std::move(value)); return *this; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& AddContextMap(const char* key, AttributeValue&& value) { m_contextMapHasBeenSet = true; m_contextMap.emplace(key, std::move(value)); return *this; } /** *

An list of attributes that are needed to successfully evaluate an * authorization request. Each attribute in this array must include a map of a data * type and its value.

Example: * "Context":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}} *

*/ inline ContextDefinition& AddContextMap(const char* key, const AttributeValue& value) { m_contextMapHasBeenSet = true; m_contextMap.emplace(key, value); return *this; } private: Aws::Map m_contextMap; bool m_contextMapHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws