/** * 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 a policy.

This data type is used as a * response parameter for the ListPolicies * operation.

See Also:

AWS * API Reference

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

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline const Aws::String& GetPolicyStoreId() const{ return m_policyStoreId; } /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; } /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline void SetPolicyStoreId(const Aws::String& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = value; } /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline void SetPolicyStoreId(Aws::String&& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = std::move(value); } /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline void SetPolicyStoreId(const char* value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId.assign(value); } /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline PolicyItem& WithPolicyStoreId(const Aws::String& value) { SetPolicyStoreId(value); return *this;} /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline PolicyItem& WithPolicyStoreId(Aws::String&& value) { SetPolicyStoreId(std::move(value)); return *this;} /** *

The identifier of the PolicyStore where the policy you want information about * is stored.

*/ inline PolicyItem& WithPolicyStoreId(const char* value) { SetPolicyStoreId(value); return *this;} /** *

The identifier of the policy you want information about.

*/ inline const Aws::String& GetPolicyId() const{ return m_policyId; } /** *

The identifier of the policy you want information about.

*/ inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; } /** *

The identifier of the policy you want information about.

*/ inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; } /** *

The identifier of the policy you want information about.

*/ inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); } /** *

The identifier of the policy you want information about.

*/ inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); } /** *

The identifier of the policy you want information about.

*/ inline PolicyItem& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;} /** *

The identifier of the policy you want information about.

*/ inline PolicyItem& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;} /** *

The identifier of the policy you want information about.

*/ inline PolicyItem& WithPolicyId(const char* value) { SetPolicyId(value); return *this;} /** *

The type of the policy. This is one of the following values:

  • *

    static

  • templateLinked

    *
*/ inline const PolicyType& GetPolicyType() const{ return m_policyType; } /** *

The type of the policy. This is one of the following values:

  • *

    static

  • templateLinked

    *
*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *

The type of the policy. This is one of the following values:

  • *

    static

  • templateLinked

    *
*/ inline void SetPolicyType(const PolicyType& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *

The type of the policy. This is one of the following values:

  • *

    static

  • templateLinked

    *
*/ inline void SetPolicyType(PolicyType&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *

The type of the policy. This is one of the following values:

  • *

    static

  • templateLinked

    *
*/ inline PolicyItem& WithPolicyType(const PolicyType& value) { SetPolicyType(value); return *this;} /** *

The type of the policy. This is one of the following values:

  • *

    static

  • templateLinked

    *
*/ inline PolicyItem& WithPolicyType(PolicyType&& value) { SetPolicyType(std::move(value)); return *this;} /** *

The principal associated with the policy.

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

The principal associated with the policy.

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

The principal associated with the policy.

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

The principal associated with the policy.

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

The principal associated with the policy.

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

The principal associated with the policy.

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

The resource associated with the policy.

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

The resource associated with the policy.

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

The resource associated with the policy.

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

The resource associated with the policy.

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

The resource associated with the policy.

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

The resource associated with the policy.

*/ inline PolicyItem& WithResource(EntityIdentifier&& value) { SetResource(std::move(value)); return *this;} /** *

The policy definition of an item in the list of policies returned.

*/ inline const PolicyDefinitionItem& GetDefinition() const{ return m_definition; } /** *

The policy definition of an item in the list of policies returned.

*/ inline bool DefinitionHasBeenSet() const { return m_definitionHasBeenSet; } /** *

The policy definition of an item in the list of policies returned.

*/ inline void SetDefinition(const PolicyDefinitionItem& value) { m_definitionHasBeenSet = true; m_definition = value; } /** *

The policy definition of an item in the list of policies returned.

*/ inline void SetDefinition(PolicyDefinitionItem&& value) { m_definitionHasBeenSet = true; m_definition = std::move(value); } /** *

The policy definition of an item in the list of policies returned.

*/ inline PolicyItem& WithDefinition(const PolicyDefinitionItem& value) { SetDefinition(value); return *this;} /** *

The policy definition of an item in the list of policies returned.

*/ inline PolicyItem& WithDefinition(PolicyDefinitionItem&& value) { SetDefinition(std::move(value)); return *this;} /** *

The date and time the policy was created.

*/ inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; } /** *

The date and time the policy was created.

*/ inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; } /** *

The date and time the policy was created.

*/ inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; } /** *

The date and time the policy was created.

*/ inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); } /** *

The date and time the policy was created.

*/ inline PolicyItem& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;} /** *

The date and time the policy was created.

*/ inline PolicyItem& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;} /** *

The date and time the policy was most recently updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedDate() const{ return m_lastUpdatedDate; } /** *

The date and time the policy was most recently updated.

*/ inline bool LastUpdatedDateHasBeenSet() const { return m_lastUpdatedDateHasBeenSet; } /** *

The date and time the policy was most recently updated.

*/ inline void SetLastUpdatedDate(const Aws::Utils::DateTime& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = value; } /** *

The date and time the policy was most recently updated.

*/ inline void SetLastUpdatedDate(Aws::Utils::DateTime&& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = std::move(value); } /** *

The date and time the policy was most recently updated.

*/ inline PolicyItem& WithLastUpdatedDate(const Aws::Utils::DateTime& value) { SetLastUpdatedDate(value); return *this;} /** *

The date and time the policy was most recently updated.

*/ inline PolicyItem& WithLastUpdatedDate(Aws::Utils::DateTime&& value) { SetLastUpdatedDate(std::move(value)); return *this;} private: Aws::String m_policyStoreId; bool m_policyStoreIdHasBeenSet = false; Aws::String m_policyId; bool m_policyIdHasBeenSet = false; PolicyType m_policyType; bool m_policyTypeHasBeenSet = false; EntityIdentifier m_principal; bool m_principalHasBeenSet = false; EntityIdentifier m_resource; bool m_resourceHasBeenSet = false; PolicyDefinitionItem m_definition; bool m_definitionHasBeenSet = false; Aws::Utils::DateTime m_createdDate; bool m_createdDateHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedDate; bool m_lastUpdatedDateHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws