/** * 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 CodeArtifact { namespace Model { /** *

An CodeArtifact resource policy that contains a resource ARN, document * details, and a revision.

See Also:

AWS * API Reference

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

The ARN of the resource associated with the resource policy

*/ inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } /** *

The ARN of the resource associated with the resource policy

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

The ARN of the resource associated with the resource policy

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

The ARN of the resource associated with the resource policy

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

The ARN of the resource associated with the resource policy

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

The ARN of the resource associated with the resource policy

*/ inline ResourcePolicy& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} /** *

The ARN of the resource associated with the resource policy

*/ inline ResourcePolicy& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} /** *

The ARN of the resource associated with the resource policy

*/ inline ResourcePolicy& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

The current revision of the resource policy.

*/ inline const Aws::String& GetRevision() const{ return m_revision; } /** *

The current revision of the resource policy.

*/ inline bool RevisionHasBeenSet() const { return m_revisionHasBeenSet; } /** *

The current revision of the resource policy.

*/ inline void SetRevision(const Aws::String& value) { m_revisionHasBeenSet = true; m_revision = value; } /** *

The current revision of the resource policy.

*/ inline void SetRevision(Aws::String&& value) { m_revisionHasBeenSet = true; m_revision = std::move(value); } /** *

The current revision of the resource policy.

*/ inline void SetRevision(const char* value) { m_revisionHasBeenSet = true; m_revision.assign(value); } /** *

The current revision of the resource policy.

*/ inline ResourcePolicy& WithRevision(const Aws::String& value) { SetRevision(value); return *this;} /** *

The current revision of the resource policy.

*/ inline ResourcePolicy& WithRevision(Aws::String&& value) { SetRevision(std::move(value)); return *this;} /** *

The current revision of the resource policy.

*/ inline ResourcePolicy& WithRevision(const char* value) { SetRevision(value); return *this;} /** *

The resource policy formatted in JSON.

*/ inline const Aws::String& GetDocument() const{ return m_document; } /** *

The resource policy formatted in JSON.

*/ inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; } /** *

The resource policy formatted in JSON.

*/ inline void SetDocument(const Aws::String& value) { m_documentHasBeenSet = true; m_document = value; } /** *

The resource policy formatted in JSON.

*/ inline void SetDocument(Aws::String&& value) { m_documentHasBeenSet = true; m_document = std::move(value); } /** *

The resource policy formatted in JSON.

*/ inline void SetDocument(const char* value) { m_documentHasBeenSet = true; m_document.assign(value); } /** *

The resource policy formatted in JSON.

*/ inline ResourcePolicy& WithDocument(const Aws::String& value) { SetDocument(value); return *this;} /** *

The resource policy formatted in JSON.

*/ inline ResourcePolicy& WithDocument(Aws::String&& value) { SetDocument(std::move(value)); return *this;} /** *

The resource policy formatted in JSON.

*/ inline ResourcePolicy& WithDocument(const char* value) { SetDocument(value); return *this;} private: Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::String m_revision; bool m_revisionHasBeenSet = false; Aws::String m_document; bool m_documentHasBeenSet = false; }; } // namespace Model } // namespace CodeArtifact } // namespace Aws