/** * 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 { /** *

Contains information about a policy created by instantiating a policy * template.

See Also:

AWS * API Reference

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

The unique identifier of the policy template used to create this policy.

*/ inline const Aws::String& GetPolicyTemplateId() const{ return m_policyTemplateId; } /** *

The unique identifier of the policy template used to create this policy.

*/ inline bool PolicyTemplateIdHasBeenSet() const { return m_policyTemplateIdHasBeenSet; } /** *

The unique identifier of the policy template used to create this policy.

*/ inline void SetPolicyTemplateId(const Aws::String& value) { m_policyTemplateIdHasBeenSet = true; m_policyTemplateId = value; } /** *

The unique identifier of the policy template used to create this policy.

*/ inline void SetPolicyTemplateId(Aws::String&& value) { m_policyTemplateIdHasBeenSet = true; m_policyTemplateId = std::move(value); } /** *

The unique identifier of the policy template used to create this policy.

*/ inline void SetPolicyTemplateId(const char* value) { m_policyTemplateIdHasBeenSet = true; m_policyTemplateId.assign(value); } /** *

The unique identifier of the policy template used to create this policy.

*/ inline TemplateLinkedPolicyDefinition& WithPolicyTemplateId(const Aws::String& value) { SetPolicyTemplateId(value); return *this;} /** *

The unique identifier of the policy template used to create this policy.

*/ inline TemplateLinkedPolicyDefinition& WithPolicyTemplateId(Aws::String&& value) { SetPolicyTemplateId(std::move(value)); return *this;} /** *

The unique identifier of the policy template used to create this policy.

*/ inline TemplateLinkedPolicyDefinition& WithPolicyTemplateId(const char* value) { SetPolicyTemplateId(value); return *this;} /** *

The principal associated with this template-linked policy. Verified * Permissions substitutes this principal for the ?principal * placeholder in the policy template when it evaluates an authorization * request.

*/ inline const EntityIdentifier& GetPrincipal() const{ return m_principal; } /** *

The principal associated with this template-linked policy. Verified * Permissions substitutes this principal for the ?principal * placeholder in the policy template when it evaluates an authorization * request.

*/ inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; } /** *

The principal associated with this template-linked policy. Verified * Permissions substitutes this principal for the ?principal * placeholder in the policy template when it evaluates an authorization * request.

*/ inline void SetPrincipal(const EntityIdentifier& value) { m_principalHasBeenSet = true; m_principal = value; } /** *

The principal associated with this template-linked policy. Verified * Permissions substitutes this principal for the ?principal * placeholder in the policy template when it evaluates an authorization * request.

*/ inline void SetPrincipal(EntityIdentifier&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); } /** *

The principal associated with this template-linked policy. Verified * Permissions substitutes this principal for the ?principal * placeholder in the policy template when it evaluates an authorization * request.

*/ inline TemplateLinkedPolicyDefinition& WithPrincipal(const EntityIdentifier& value) { SetPrincipal(value); return *this;} /** *

The principal associated with this template-linked policy. Verified * Permissions substitutes this principal for the ?principal * placeholder in the policy template when it evaluates an authorization * request.

*/ inline TemplateLinkedPolicyDefinition& WithPrincipal(EntityIdentifier&& value) { SetPrincipal(std::move(value)); return *this;} /** *

The resource associated with this template-linked policy. Verified * Permissions substitutes this resource for the ?resource placeholder * in the policy template when it evaluates an authorization request.

*/ inline const EntityIdentifier& GetResource() const{ return m_resource; } /** *

The resource associated with this template-linked policy. Verified * Permissions substitutes this resource for the ?resource placeholder * in the policy template when it evaluates an authorization request.

*/ inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; } /** *

The resource associated with this template-linked policy. Verified * Permissions substitutes this resource for the ?resource placeholder * in the policy template when it evaluates an authorization request.

*/ inline void SetResource(const EntityIdentifier& value) { m_resourceHasBeenSet = true; m_resource = value; } /** *

The resource associated with this template-linked policy. Verified * Permissions substitutes this resource for the ?resource placeholder * in the policy template when it evaluates an authorization request.

*/ inline void SetResource(EntityIdentifier&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); } /** *

The resource associated with this template-linked policy. Verified * Permissions substitutes this resource for the ?resource placeholder * in the policy template when it evaluates an authorization request.

*/ inline TemplateLinkedPolicyDefinition& WithResource(const EntityIdentifier& value) { SetResource(value); return *this;} /** *

The resource associated with this template-linked policy. Verified * Permissions substitutes this resource for the ?resource placeholder * in the policy template when it evaluates an authorization request.

*/ inline TemplateLinkedPolicyDefinition& WithResource(EntityIdentifier&& value) { SetResource(std::move(value)); return *this;} private: Aws::String m_policyTemplateId; bool m_policyTemplateIdHasBeenSet = false; EntityIdentifier m_principal; bool m_principalHasBeenSet = false; EntityIdentifier m_resource; bool m_resourceHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws