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

Contains the PolicyType, PolicyId, and the * ObjectIdentifier to which it is attached. For more information, see * Policies.

See * Also:

AWS * API Reference

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ID of PolicyAttachment.

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

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline const Aws::String& GetObjectIdentifier() const{ return m_objectIdentifier; } /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline bool ObjectIdentifierHasBeenSet() const { return m_objectIdentifierHasBeenSet; } /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline void SetObjectIdentifier(const Aws::String& value) { m_objectIdentifierHasBeenSet = true; m_objectIdentifier = value; } /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline void SetObjectIdentifier(Aws::String&& value) { m_objectIdentifierHasBeenSet = true; m_objectIdentifier = std::move(value); } /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline void SetObjectIdentifier(const char* value) { m_objectIdentifierHasBeenSet = true; m_objectIdentifier.assign(value); } /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline PolicyAttachment& WithObjectIdentifier(const Aws::String& value) { SetObjectIdentifier(value); return *this;} /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline PolicyAttachment& WithObjectIdentifier(Aws::String&& value) { SetObjectIdentifier(std::move(value)); return *this;} /** *

The ObjectIdentifier that is associated with * PolicyAttachment.

*/ inline PolicyAttachment& WithObjectIdentifier(const char* value) { SetObjectIdentifier(value); return *this;} /** *

The type of policy that can be associated with * PolicyAttachment.

*/ inline const Aws::String& GetPolicyType() const{ return m_policyType; } /** *

The type of policy that can be associated with * PolicyAttachment.

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

The type of policy that can be associated with * PolicyAttachment.

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

The type of policy that can be associated with * PolicyAttachment.

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

The type of policy that can be associated with * PolicyAttachment.

*/ inline void SetPolicyType(const char* value) { m_policyTypeHasBeenSet = true; m_policyType.assign(value); } /** *

The type of policy that can be associated with * PolicyAttachment.

*/ inline PolicyAttachment& WithPolicyType(const Aws::String& value) { SetPolicyType(value); return *this;} /** *

The type of policy that can be associated with * PolicyAttachment.

*/ inline PolicyAttachment& WithPolicyType(Aws::String&& value) { SetPolicyType(std::move(value)); return *this;} /** *

The type of policy that can be associated with * PolicyAttachment.

*/ inline PolicyAttachment& WithPolicyType(const char* value) { SetPolicyType(value); return *this;} private: Aws::String m_policyId; bool m_policyIdHasBeenSet = false; Aws::String m_objectIdentifier; bool m_objectIdentifierHasBeenSet = false; Aws::String m_policyType; bool m_policyTypeHasBeenSet = false; }; } // namespace Model } // namespace CloudDirectory } // namespace Aws