1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/codeartifact/CodeArtifact_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace CodeArtifact 22 { 23 namespace Model 24 { 25 26 /** 27 * <p> An AWS CodeArtifact resource policy that contains a resource ARN, document 28 * details, and a revision. </p><p><h3>See Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/ResourcePolicy">AWS 30 * API Reference</a></p> 31 */ 32 class AWS_CODEARTIFACT_API ResourcePolicy 33 { 34 public: 35 ResourcePolicy(); 36 ResourcePolicy(Aws::Utils::Json::JsonView jsonValue); 37 ResourcePolicy& operator=(Aws::Utils::Json::JsonView jsonValue); 38 Aws::Utils::Json::JsonValue Jsonize() const; 39 40 41 /** 42 * <p> The ARN of the resource associated with the resource policy </p> 43 */ GetResourceArn()44 inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } 45 46 /** 47 * <p> The ARN of the resource associated with the resource policy </p> 48 */ ResourceArnHasBeenSet()49 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } 50 51 /** 52 * <p> The ARN of the resource associated with the resource policy </p> 53 */ SetResourceArn(const Aws::String & value)54 inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } 55 56 /** 57 * <p> The ARN of the resource associated with the resource policy </p> 58 */ SetResourceArn(Aws::String && value)59 inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } 60 61 /** 62 * <p> The ARN of the resource associated with the resource policy </p> 63 */ SetResourceArn(const char * value)64 inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } 65 66 /** 67 * <p> The ARN of the resource associated with the resource policy </p> 68 */ WithResourceArn(const Aws::String & value)69 inline ResourcePolicy& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} 70 71 /** 72 * <p> The ARN of the resource associated with the resource policy </p> 73 */ WithResourceArn(Aws::String && value)74 inline ResourcePolicy& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} 75 76 /** 77 * <p> The ARN of the resource associated with the resource policy </p> 78 */ WithResourceArn(const char * value)79 inline ResourcePolicy& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} 80 81 82 /** 83 * <p> The current revision of the resource policy. </p> 84 */ GetRevision()85 inline const Aws::String& GetRevision() const{ return m_revision; } 86 87 /** 88 * <p> The current revision of the resource policy. </p> 89 */ RevisionHasBeenSet()90 inline bool RevisionHasBeenSet() const { return m_revisionHasBeenSet; } 91 92 /** 93 * <p> The current revision of the resource policy. </p> 94 */ SetRevision(const Aws::String & value)95 inline void SetRevision(const Aws::String& value) { m_revisionHasBeenSet = true; m_revision = value; } 96 97 /** 98 * <p> The current revision of the resource policy. </p> 99 */ SetRevision(Aws::String && value)100 inline void SetRevision(Aws::String&& value) { m_revisionHasBeenSet = true; m_revision = std::move(value); } 101 102 /** 103 * <p> The current revision of the resource policy. </p> 104 */ SetRevision(const char * value)105 inline void SetRevision(const char* value) { m_revisionHasBeenSet = true; m_revision.assign(value); } 106 107 /** 108 * <p> The current revision of the resource policy. </p> 109 */ WithRevision(const Aws::String & value)110 inline ResourcePolicy& WithRevision(const Aws::String& value) { SetRevision(value); return *this;} 111 112 /** 113 * <p> The current revision of the resource policy. </p> 114 */ WithRevision(Aws::String && value)115 inline ResourcePolicy& WithRevision(Aws::String&& value) { SetRevision(std::move(value)); return *this;} 116 117 /** 118 * <p> The current revision of the resource policy. </p> 119 */ WithRevision(const char * value)120 inline ResourcePolicy& WithRevision(const char* value) { SetRevision(value); return *this;} 121 122 123 /** 124 * <p> The resource policy formatted in JSON. </p> 125 */ GetDocument()126 inline const Aws::String& GetDocument() const{ return m_document; } 127 128 /** 129 * <p> The resource policy formatted in JSON. </p> 130 */ DocumentHasBeenSet()131 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; } 132 133 /** 134 * <p> The resource policy formatted in JSON. </p> 135 */ SetDocument(const Aws::String & value)136 inline void SetDocument(const Aws::String& value) { m_documentHasBeenSet = true; m_document = value; } 137 138 /** 139 * <p> The resource policy formatted in JSON. </p> 140 */ SetDocument(Aws::String && value)141 inline void SetDocument(Aws::String&& value) { m_documentHasBeenSet = true; m_document = std::move(value); } 142 143 /** 144 * <p> The resource policy formatted in JSON. </p> 145 */ SetDocument(const char * value)146 inline void SetDocument(const char* value) { m_documentHasBeenSet = true; m_document.assign(value); } 147 148 /** 149 * <p> The resource policy formatted in JSON. </p> 150 */ WithDocument(const Aws::String & value)151 inline ResourcePolicy& WithDocument(const Aws::String& value) { SetDocument(value); return *this;} 152 153 /** 154 * <p> The resource policy formatted in JSON. </p> 155 */ WithDocument(Aws::String && value)156 inline ResourcePolicy& WithDocument(Aws::String&& value) { SetDocument(std::move(value)); return *this;} 157 158 /** 159 * <p> The resource policy formatted in JSON. </p> 160 */ WithDocument(const char * value)161 inline ResourcePolicy& WithDocument(const char* value) { SetDocument(value); return *this;} 162 163 private: 164 165 Aws::String m_resourceArn; 166 bool m_resourceArnHasBeenSet; 167 168 Aws::String m_revision; 169 bool m_revisionHasBeenSet; 170 171 Aws::String m_document; 172 bool m_documentHasBeenSet; 173 }; 174 175 } // namespace Model 176 } // namespace CodeArtifact 177 } // namespace Aws 178