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/codeartifact/CodeArtifactRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Http
15 {
16     class URI;
17 } //namespace Http
18 namespace CodeArtifact
19 {
20 namespace Model
21 {
22 
23   /**
24    */
25   class AWS_CODEARTIFACT_API PutRepositoryPermissionsPolicyRequest : public CodeArtifactRequest
26   {
27   public:
28     PutRepositoryPermissionsPolicyRequest();
29 
30     // Service request name is the Operation name which will send this request out,
31     // each operation should has unique request name, so that we can get operation's name from this request.
32     // Note: this is not true for response, multiple operations may have the same response name,
33     // so we can not get operation's name from response.
GetServiceRequestName()34     inline virtual const char* GetServiceRequestName() const override { return "PutRepositoryPermissionsPolicy"; }
35 
36     Aws::String SerializePayload() const override;
37 
38     void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39 
40 
41     /**
42      * <p> The name of the domain containing the repository to set the resource policy
43      * on. </p>
44      */
GetDomain()45     inline const Aws::String& GetDomain() const{ return m_domain; }
46 
47     /**
48      * <p> The name of the domain containing the repository to set the resource policy
49      * on. </p>
50      */
DomainHasBeenSet()51     inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; }
52 
53     /**
54      * <p> The name of the domain containing the repository to set the resource policy
55      * on. </p>
56      */
SetDomain(const Aws::String & value)57     inline void SetDomain(const Aws::String& value) { m_domainHasBeenSet = true; m_domain = value; }
58 
59     /**
60      * <p> The name of the domain containing the repository to set the resource policy
61      * on. </p>
62      */
SetDomain(Aws::String && value)63     inline void SetDomain(Aws::String&& value) { m_domainHasBeenSet = true; m_domain = std::move(value); }
64 
65     /**
66      * <p> The name of the domain containing the repository to set the resource policy
67      * on. </p>
68      */
SetDomain(const char * value)69     inline void SetDomain(const char* value) { m_domainHasBeenSet = true; m_domain.assign(value); }
70 
71     /**
72      * <p> The name of the domain containing the repository to set the resource policy
73      * on. </p>
74      */
WithDomain(const Aws::String & value)75     inline PutRepositoryPermissionsPolicyRequest& WithDomain(const Aws::String& value) { SetDomain(value); return *this;}
76 
77     /**
78      * <p> The name of the domain containing the repository to set the resource policy
79      * on. </p>
80      */
WithDomain(Aws::String && value)81     inline PutRepositoryPermissionsPolicyRequest& WithDomain(Aws::String&& value) { SetDomain(std::move(value)); return *this;}
82 
83     /**
84      * <p> The name of the domain containing the repository to set the resource policy
85      * on. </p>
86      */
WithDomain(const char * value)87     inline PutRepositoryPermissionsPolicyRequest& WithDomain(const char* value) { SetDomain(value); return *this;}
88 
89 
90     /**
91      * <p> The 12-digit account number of the AWS account that owns the domain. It does
92      * not include dashes or spaces. </p>
93      */
GetDomainOwner()94     inline const Aws::String& GetDomainOwner() const{ return m_domainOwner; }
95 
96     /**
97      * <p> The 12-digit account number of the AWS account that owns the domain. It does
98      * not include dashes or spaces. </p>
99      */
DomainOwnerHasBeenSet()100     inline bool DomainOwnerHasBeenSet() const { return m_domainOwnerHasBeenSet; }
101 
102     /**
103      * <p> The 12-digit account number of the AWS account that owns the domain. It does
104      * not include dashes or spaces. </p>
105      */
SetDomainOwner(const Aws::String & value)106     inline void SetDomainOwner(const Aws::String& value) { m_domainOwnerHasBeenSet = true; m_domainOwner = value; }
107 
108     /**
109      * <p> The 12-digit account number of the AWS account that owns the domain. It does
110      * not include dashes or spaces. </p>
111      */
SetDomainOwner(Aws::String && value)112     inline void SetDomainOwner(Aws::String&& value) { m_domainOwnerHasBeenSet = true; m_domainOwner = std::move(value); }
113 
114     /**
115      * <p> The 12-digit account number of the AWS account that owns the domain. It does
116      * not include dashes or spaces. </p>
117      */
SetDomainOwner(const char * value)118     inline void SetDomainOwner(const char* value) { m_domainOwnerHasBeenSet = true; m_domainOwner.assign(value); }
119 
120     /**
121      * <p> The 12-digit account number of the AWS account that owns the domain. It does
122      * not include dashes or spaces. </p>
123      */
WithDomainOwner(const Aws::String & value)124     inline PutRepositoryPermissionsPolicyRequest& WithDomainOwner(const Aws::String& value) { SetDomainOwner(value); return *this;}
125 
126     /**
127      * <p> The 12-digit account number of the AWS account that owns the domain. It does
128      * not include dashes or spaces. </p>
129      */
WithDomainOwner(Aws::String && value)130     inline PutRepositoryPermissionsPolicyRequest& WithDomainOwner(Aws::String&& value) { SetDomainOwner(std::move(value)); return *this;}
131 
132     /**
133      * <p> The 12-digit account number of the AWS account that owns the domain. It does
134      * not include dashes or spaces. </p>
135      */
WithDomainOwner(const char * value)136     inline PutRepositoryPermissionsPolicyRequest& WithDomainOwner(const char* value) { SetDomainOwner(value); return *this;}
137 
138 
139     /**
140      * <p> The name of the repository to set the resource policy on. </p>
141      */
GetRepository()142     inline const Aws::String& GetRepository() const{ return m_repository; }
143 
144     /**
145      * <p> The name of the repository to set the resource policy on. </p>
146      */
RepositoryHasBeenSet()147     inline bool RepositoryHasBeenSet() const { return m_repositoryHasBeenSet; }
148 
149     /**
150      * <p> The name of the repository to set the resource policy on. </p>
151      */
SetRepository(const Aws::String & value)152     inline void SetRepository(const Aws::String& value) { m_repositoryHasBeenSet = true; m_repository = value; }
153 
154     /**
155      * <p> The name of the repository to set the resource policy on. </p>
156      */
SetRepository(Aws::String && value)157     inline void SetRepository(Aws::String&& value) { m_repositoryHasBeenSet = true; m_repository = std::move(value); }
158 
159     /**
160      * <p> The name of the repository to set the resource policy on. </p>
161      */
SetRepository(const char * value)162     inline void SetRepository(const char* value) { m_repositoryHasBeenSet = true; m_repository.assign(value); }
163 
164     /**
165      * <p> The name of the repository to set the resource policy on. </p>
166      */
WithRepository(const Aws::String & value)167     inline PutRepositoryPermissionsPolicyRequest& WithRepository(const Aws::String& value) { SetRepository(value); return *this;}
168 
169     /**
170      * <p> The name of the repository to set the resource policy on. </p>
171      */
WithRepository(Aws::String && value)172     inline PutRepositoryPermissionsPolicyRequest& WithRepository(Aws::String&& value) { SetRepository(std::move(value)); return *this;}
173 
174     /**
175      * <p> The name of the repository to set the resource policy on. </p>
176      */
WithRepository(const char * value)177     inline PutRepositoryPermissionsPolicyRequest& WithRepository(const char* value) { SetRepository(value); return *this;}
178 
179 
180     /**
181      * <p> Sets the revision of the resource policy that specifies permissions to
182      * access the repository. This revision is used for optimistic locking, which
183      * prevents others from overwriting your changes to the repository's resource
184      * policy. </p>
185      */
GetPolicyRevision()186     inline const Aws::String& GetPolicyRevision() const{ return m_policyRevision; }
187 
188     /**
189      * <p> Sets the revision of the resource policy that specifies permissions to
190      * access the repository. This revision is used for optimistic locking, which
191      * prevents others from overwriting your changes to the repository's resource
192      * policy. </p>
193      */
PolicyRevisionHasBeenSet()194     inline bool PolicyRevisionHasBeenSet() const { return m_policyRevisionHasBeenSet; }
195 
196     /**
197      * <p> Sets the revision of the resource policy that specifies permissions to
198      * access the repository. This revision is used for optimistic locking, which
199      * prevents others from overwriting your changes to the repository's resource
200      * policy. </p>
201      */
SetPolicyRevision(const Aws::String & value)202     inline void SetPolicyRevision(const Aws::String& value) { m_policyRevisionHasBeenSet = true; m_policyRevision = value; }
203 
204     /**
205      * <p> Sets the revision of the resource policy that specifies permissions to
206      * access the repository. This revision is used for optimistic locking, which
207      * prevents others from overwriting your changes to the repository's resource
208      * policy. </p>
209      */
SetPolicyRevision(Aws::String && value)210     inline void SetPolicyRevision(Aws::String&& value) { m_policyRevisionHasBeenSet = true; m_policyRevision = std::move(value); }
211 
212     /**
213      * <p> Sets the revision of the resource policy that specifies permissions to
214      * access the repository. This revision is used for optimistic locking, which
215      * prevents others from overwriting your changes to the repository's resource
216      * policy. </p>
217      */
SetPolicyRevision(const char * value)218     inline void SetPolicyRevision(const char* value) { m_policyRevisionHasBeenSet = true; m_policyRevision.assign(value); }
219 
220     /**
221      * <p> Sets the revision of the resource policy that specifies permissions to
222      * access the repository. This revision is used for optimistic locking, which
223      * prevents others from overwriting your changes to the repository's resource
224      * policy. </p>
225      */
WithPolicyRevision(const Aws::String & value)226     inline PutRepositoryPermissionsPolicyRequest& WithPolicyRevision(const Aws::String& value) { SetPolicyRevision(value); return *this;}
227 
228     /**
229      * <p> Sets the revision of the resource policy that specifies permissions to
230      * access the repository. This revision is used for optimistic locking, which
231      * prevents others from overwriting your changes to the repository's resource
232      * policy. </p>
233      */
WithPolicyRevision(Aws::String && value)234     inline PutRepositoryPermissionsPolicyRequest& WithPolicyRevision(Aws::String&& value) { SetPolicyRevision(std::move(value)); return *this;}
235 
236     /**
237      * <p> Sets the revision of the resource policy that specifies permissions to
238      * access the repository. This revision is used for optimistic locking, which
239      * prevents others from overwriting your changes to the repository's resource
240      * policy. </p>
241      */
WithPolicyRevision(const char * value)242     inline PutRepositoryPermissionsPolicyRequest& WithPolicyRevision(const char* value) { SetPolicyRevision(value); return *this;}
243 
244 
245     /**
246      * <p> A valid displayable JSON Aspen policy string to be set as the access control
247      * resource policy on the provided repository. </p>
248      */
GetPolicyDocument()249     inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; }
250 
251     /**
252      * <p> A valid displayable JSON Aspen policy string to be set as the access control
253      * resource policy on the provided repository. </p>
254      */
PolicyDocumentHasBeenSet()255     inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
256 
257     /**
258      * <p> A valid displayable JSON Aspen policy string to be set as the access control
259      * resource policy on the provided repository. </p>
260      */
SetPolicyDocument(const Aws::String & value)261     inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; }
262 
263     /**
264      * <p> A valid displayable JSON Aspen policy string to be set as the access control
265      * resource policy on the provided repository. </p>
266      */
SetPolicyDocument(Aws::String && value)267     inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); }
268 
269     /**
270      * <p> A valid displayable JSON Aspen policy string to be set as the access control
271      * resource policy on the provided repository. </p>
272      */
SetPolicyDocument(const char * value)273     inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); }
274 
275     /**
276      * <p> A valid displayable JSON Aspen policy string to be set as the access control
277      * resource policy on the provided repository. </p>
278      */
WithPolicyDocument(const Aws::String & value)279     inline PutRepositoryPermissionsPolicyRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;}
280 
281     /**
282      * <p> A valid displayable JSON Aspen policy string to be set as the access control
283      * resource policy on the provided repository. </p>
284      */
WithPolicyDocument(Aws::String && value)285     inline PutRepositoryPermissionsPolicyRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;}
286 
287     /**
288      * <p> A valid displayable JSON Aspen policy string to be set as the access control
289      * resource policy on the provided repository. </p>
290      */
WithPolicyDocument(const char * value)291     inline PutRepositoryPermissionsPolicyRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;}
292 
293   private:
294 
295     Aws::String m_domain;
296     bool m_domainHasBeenSet;
297 
298     Aws::String m_domainOwner;
299     bool m_domainOwnerHasBeenSet;
300 
301     Aws::String m_repository;
302     bool m_repositoryHasBeenSet;
303 
304     Aws::String m_policyRevision;
305     bool m_policyRevisionHasBeenSet;
306 
307     Aws::String m_policyDocument;
308     bool m_policyDocumentHasBeenSet;
309   };
310 
311 } // namespace Model
312 } // namespace CodeArtifact
313 } // namespace Aws
314