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

Contains information about an entity that can be referenced in a Cedar * policy.

This data type is used as one of the fields in the EntitiesDefinition * structure.

{ "id": { "entityType": "Photo", "entityId": * "VacationPhoto94.jpg" }, "Attributes": {}, "Parents": [ { "entityType": "Album", * "entityId": "alice_folder" } ] }

See Also:

AWS * API Reference

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

The identifier of the entity.

*/ inline const EntityIdentifier& GetIdentifier() const{ return m_identifier; } /** *

The identifier of the entity.

*/ inline bool IdentifierHasBeenSet() const { return m_identifierHasBeenSet; } /** *

The identifier of the entity.

*/ inline void SetIdentifier(const EntityIdentifier& value) { m_identifierHasBeenSet = true; m_identifier = value; } /** *

The identifier of the entity.

*/ inline void SetIdentifier(EntityIdentifier&& value) { m_identifierHasBeenSet = true; m_identifier = std::move(value); } /** *

The identifier of the entity.

*/ inline EntityItem& WithIdentifier(const EntityIdentifier& value) { SetIdentifier(value); return *this;} /** *

The identifier of the entity.

*/ inline EntityItem& WithIdentifier(EntityIdentifier&& value) { SetIdentifier(std::move(value)); return *this;} /** *

A list of attributes for the entity.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

A list of attributes for the entity.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

A list of attributes for the entity.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

A list of attributes for the entity.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

A list of attributes for the entity.

*/ inline EntityItem& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

A list of attributes for the entity.

*/ inline EntityItem& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

A list of attributes for the entity.

*/ inline EntityItem& AddAttributes(const Aws::String& key, const AttributeValue& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

A list of attributes for the entity.

*/ inline EntityItem& AddAttributes(Aws::String&& key, const AttributeValue& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A list of attributes for the entity.

*/ inline EntityItem& AddAttributes(const Aws::String& key, AttributeValue&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A list of attributes for the entity.

*/ inline EntityItem& AddAttributes(Aws::String&& key, AttributeValue&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A list of attributes for the entity.

*/ inline EntityItem& AddAttributes(const char* key, AttributeValue&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A list of attributes for the entity.

*/ inline EntityItem& AddAttributes(const char* key, const AttributeValue& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

The parents in the hierarchy that contains the entity.

*/ inline const Aws::Vector& GetParents() const{ return m_parents; } /** *

The parents in the hierarchy that contains the entity.

*/ inline bool ParentsHasBeenSet() const { return m_parentsHasBeenSet; } /** *

The parents in the hierarchy that contains the entity.

*/ inline void SetParents(const Aws::Vector& value) { m_parentsHasBeenSet = true; m_parents = value; } /** *

The parents in the hierarchy that contains the entity.

*/ inline void SetParents(Aws::Vector&& value) { m_parentsHasBeenSet = true; m_parents = std::move(value); } /** *

The parents in the hierarchy that contains the entity.

*/ inline EntityItem& WithParents(const Aws::Vector& value) { SetParents(value); return *this;} /** *

The parents in the hierarchy that contains the entity.

*/ inline EntityItem& WithParents(Aws::Vector&& value) { SetParents(std::move(value)); return *this;} /** *

The parents in the hierarchy that contains the entity.

*/ inline EntityItem& AddParents(const EntityIdentifier& value) { m_parentsHasBeenSet = true; m_parents.push_back(value); return *this; } /** *

The parents in the hierarchy that contains the entity.

*/ inline EntityItem& AddParents(EntityIdentifier&& value) { m_parentsHasBeenSet = true; m_parents.push_back(std::move(value)); return *this; } private: EntityIdentifier m_identifier; bool m_identifierHasBeenSet = false; Aws::Map m_attributes; bool m_attributesHasBeenSet = false; Aws::Vector m_parents; bool m_parentsHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws