/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace VerifiedPermissions { namespace Model { /** *

A structure that contains the details for a Cedar policy definition. It * includes the policy type, a description, and a policy body. This is a top level * data type used to create a policy.

This data type is used as a request * parameter for the CreatePolicy * operation. This structure must always have either an static or a * templateLinked element.

See Also:

AWS * API Reference

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

A structure that describes a static policy. An static policy doesn't use a * template or allow placeholders for entities.

*/ inline const StaticPolicyDefinition& GetStatic() const{ return m_static; } /** *

A structure that describes a static policy. An static policy doesn't use a * template or allow placeholders for entities.

*/ inline bool StaticHasBeenSet() const { return m_staticHasBeenSet; } /** *

A structure that describes a static policy. An static policy doesn't use a * template or allow placeholders for entities.

*/ inline void SetStatic(const StaticPolicyDefinition& value) { m_staticHasBeenSet = true; m_static = value; } /** *

A structure that describes a static policy. An static policy doesn't use a * template or allow placeholders for entities.

*/ inline void SetStatic(StaticPolicyDefinition&& value) { m_staticHasBeenSet = true; m_static = std::move(value); } /** *

A structure that describes a static policy. An static policy doesn't use a * template or allow placeholders for entities.

*/ inline PolicyDefinition& WithStatic(const StaticPolicyDefinition& value) { SetStatic(value); return *this;} /** *

A structure that describes a static policy. An static policy doesn't use a * template or allow placeholders for entities.

*/ inline PolicyDefinition& WithStatic(StaticPolicyDefinition&& value) { SetStatic(std::move(value)); return *this;} /** *

A structure that describes a policy that was instantiated from a template. * The template can specify placeholders for principal and * resource. When you use CreatePolicy * to create a policy from a template, you specify the exact principal and resource * to use for the instantiated policy.

*/ inline const TemplateLinkedPolicyDefinition& GetTemplateLinked() const{ return m_templateLinked; } /** *

A structure that describes a policy that was instantiated from a template. * The template can specify placeholders for principal and * resource. When you use CreatePolicy * to create a policy from a template, you specify the exact principal and resource * to use for the instantiated policy.

*/ inline bool TemplateLinkedHasBeenSet() const { return m_templateLinkedHasBeenSet; } /** *

A structure that describes a policy that was instantiated from a template. * The template can specify placeholders for principal and * resource. When you use CreatePolicy * to create a policy from a template, you specify the exact principal and resource * to use for the instantiated policy.

*/ inline void SetTemplateLinked(const TemplateLinkedPolicyDefinition& value) { m_templateLinkedHasBeenSet = true; m_templateLinked = value; } /** *

A structure that describes a policy that was instantiated from a template. * The template can specify placeholders for principal and * resource. When you use CreatePolicy * to create a policy from a template, you specify the exact principal and resource * to use for the instantiated policy.

*/ inline void SetTemplateLinked(TemplateLinkedPolicyDefinition&& value) { m_templateLinkedHasBeenSet = true; m_templateLinked = std::move(value); } /** *

A structure that describes a policy that was instantiated from a template. * The template can specify placeholders for principal and * resource. When you use CreatePolicy * to create a policy from a template, you specify the exact principal and resource * to use for the instantiated policy.

*/ inline PolicyDefinition& WithTemplateLinked(const TemplateLinkedPolicyDefinition& value) { SetTemplateLinked(value); return *this;} /** *

A structure that describes a policy that was instantiated from a template. * The template can specify placeholders for principal and * resource. When you use CreatePolicy * to create a policy from a template, you specify the exact principal and resource * to use for the instantiated policy.

*/ inline PolicyDefinition& WithTemplateLinked(TemplateLinkedPolicyDefinition&& value) { SetTemplateLinked(std::move(value)); return *this;} private: StaticPolicyDefinition m_static; bool m_staticHasBeenSet = false; TemplateLinkedPolicyDefinition m_templateLinked; bool m_templateLinkedHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws