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/redshift/Redshift_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <aws/redshift/model/AuthorizationStatus.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/redshift/model/ResponseMetadata.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 template<typename RESULT_TYPE>
18 class AmazonWebServiceResult;
19 
20 namespace Utils
21 {
22 namespace Xml
23 {
24   class XmlDocument;
25 } // namespace Xml
26 } // namespace Utils
27 namespace Redshift
28 {
29 namespace Model
30 {
31   /**
32    * <p>Describes an endpoint authorization for authorizing Redshift-managed VPC
33    * endpoint access to a cluster across Amazon Web Services accounts.</p><p><h3>See
34    * Also:</h3>   <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EndpointAuthorization">AWS
36    * API Reference</a></p>
37    */
38   class AWS_REDSHIFT_API AuthorizeEndpointAccessResult
39   {
40   public:
41     AuthorizeEndpointAccessResult();
42     AuthorizeEndpointAccessResult(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
43     AuthorizeEndpointAccessResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
44 
45 
46     /**
47      * <p>The Amazon Web Services account ID of the cluster owner.</p>
48      */
GetGrantor()49     inline const Aws::String& GetGrantor() const{ return m_grantor; }
50 
51     /**
52      * <p>The Amazon Web Services account ID of the cluster owner.</p>
53      */
SetGrantor(const Aws::String & value)54     inline void SetGrantor(const Aws::String& value) { m_grantor = value; }
55 
56     /**
57      * <p>The Amazon Web Services account ID of the cluster owner.</p>
58      */
SetGrantor(Aws::String && value)59     inline void SetGrantor(Aws::String&& value) { m_grantor = std::move(value); }
60 
61     /**
62      * <p>The Amazon Web Services account ID of the cluster owner.</p>
63      */
SetGrantor(const char * value)64     inline void SetGrantor(const char* value) { m_grantor.assign(value); }
65 
66     /**
67      * <p>The Amazon Web Services account ID of the cluster owner.</p>
68      */
WithGrantor(const Aws::String & value)69     inline AuthorizeEndpointAccessResult& WithGrantor(const Aws::String& value) { SetGrantor(value); return *this;}
70 
71     /**
72      * <p>The Amazon Web Services account ID of the cluster owner.</p>
73      */
WithGrantor(Aws::String && value)74     inline AuthorizeEndpointAccessResult& WithGrantor(Aws::String&& value) { SetGrantor(std::move(value)); return *this;}
75 
76     /**
77      * <p>The Amazon Web Services account ID of the cluster owner.</p>
78      */
WithGrantor(const char * value)79     inline AuthorizeEndpointAccessResult& WithGrantor(const char* value) { SetGrantor(value); return *this;}
80 
81 
82     /**
83      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
84      */
GetGrantee()85     inline const Aws::String& GetGrantee() const{ return m_grantee; }
86 
87     /**
88      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
89      */
SetGrantee(const Aws::String & value)90     inline void SetGrantee(const Aws::String& value) { m_grantee = value; }
91 
92     /**
93      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
94      */
SetGrantee(Aws::String && value)95     inline void SetGrantee(Aws::String&& value) { m_grantee = std::move(value); }
96 
97     /**
98      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
99      */
SetGrantee(const char * value)100     inline void SetGrantee(const char* value) { m_grantee.assign(value); }
101 
102     /**
103      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
104      */
WithGrantee(const Aws::String & value)105     inline AuthorizeEndpointAccessResult& WithGrantee(const Aws::String& value) { SetGrantee(value); return *this;}
106 
107     /**
108      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
109      */
WithGrantee(Aws::String && value)110     inline AuthorizeEndpointAccessResult& WithGrantee(Aws::String&& value) { SetGrantee(std::move(value)); return *this;}
111 
112     /**
113      * <p>The Amazon Web Services account ID of the grantee of the cluster.</p>
114      */
WithGrantee(const char * value)115     inline AuthorizeEndpointAccessResult& WithGrantee(const char* value) { SetGrantee(value); return *this;}
116 
117 
118     /**
119      * <p>The cluster identifier.</p>
120      */
GetClusterIdentifier()121     inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; }
122 
123     /**
124      * <p>The cluster identifier.</p>
125      */
SetClusterIdentifier(const Aws::String & value)126     inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifier = value; }
127 
128     /**
129      * <p>The cluster identifier.</p>
130      */
SetClusterIdentifier(Aws::String && value)131     inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifier = std::move(value); }
132 
133     /**
134      * <p>The cluster identifier.</p>
135      */
SetClusterIdentifier(const char * value)136     inline void SetClusterIdentifier(const char* value) { m_clusterIdentifier.assign(value); }
137 
138     /**
139      * <p>The cluster identifier.</p>
140      */
WithClusterIdentifier(const Aws::String & value)141     inline AuthorizeEndpointAccessResult& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;}
142 
143     /**
144      * <p>The cluster identifier.</p>
145      */
WithClusterIdentifier(Aws::String && value)146     inline AuthorizeEndpointAccessResult& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;}
147 
148     /**
149      * <p>The cluster identifier.</p>
150      */
WithClusterIdentifier(const char * value)151     inline AuthorizeEndpointAccessResult& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;}
152 
153 
154     /**
155      * <p>The time (UTC) when the authorization was created.</p>
156      */
GetAuthorizeTime()157     inline const Aws::Utils::DateTime& GetAuthorizeTime() const{ return m_authorizeTime; }
158 
159     /**
160      * <p>The time (UTC) when the authorization was created.</p>
161      */
SetAuthorizeTime(const Aws::Utils::DateTime & value)162     inline void SetAuthorizeTime(const Aws::Utils::DateTime& value) { m_authorizeTime = value; }
163 
164     /**
165      * <p>The time (UTC) when the authorization was created.</p>
166      */
SetAuthorizeTime(Aws::Utils::DateTime && value)167     inline void SetAuthorizeTime(Aws::Utils::DateTime&& value) { m_authorizeTime = std::move(value); }
168 
169     /**
170      * <p>The time (UTC) when the authorization was created.</p>
171      */
WithAuthorizeTime(const Aws::Utils::DateTime & value)172     inline AuthorizeEndpointAccessResult& WithAuthorizeTime(const Aws::Utils::DateTime& value) { SetAuthorizeTime(value); return *this;}
173 
174     /**
175      * <p>The time (UTC) when the authorization was created.</p>
176      */
WithAuthorizeTime(Aws::Utils::DateTime && value)177     inline AuthorizeEndpointAccessResult& WithAuthorizeTime(Aws::Utils::DateTime&& value) { SetAuthorizeTime(std::move(value)); return *this;}
178 
179 
180     /**
181      * <p>The status of the cluster.</p>
182      */
GetClusterStatus()183     inline const Aws::String& GetClusterStatus() const{ return m_clusterStatus; }
184 
185     /**
186      * <p>The status of the cluster.</p>
187      */
SetClusterStatus(const Aws::String & value)188     inline void SetClusterStatus(const Aws::String& value) { m_clusterStatus = value; }
189 
190     /**
191      * <p>The status of the cluster.</p>
192      */
SetClusterStatus(Aws::String && value)193     inline void SetClusterStatus(Aws::String&& value) { m_clusterStatus = std::move(value); }
194 
195     /**
196      * <p>The status of the cluster.</p>
197      */
SetClusterStatus(const char * value)198     inline void SetClusterStatus(const char* value) { m_clusterStatus.assign(value); }
199 
200     /**
201      * <p>The status of the cluster.</p>
202      */
WithClusterStatus(const Aws::String & value)203     inline AuthorizeEndpointAccessResult& WithClusterStatus(const Aws::String& value) { SetClusterStatus(value); return *this;}
204 
205     /**
206      * <p>The status of the cluster.</p>
207      */
WithClusterStatus(Aws::String && value)208     inline AuthorizeEndpointAccessResult& WithClusterStatus(Aws::String&& value) { SetClusterStatus(std::move(value)); return *this;}
209 
210     /**
211      * <p>The status of the cluster.</p>
212      */
WithClusterStatus(const char * value)213     inline AuthorizeEndpointAccessResult& WithClusterStatus(const char* value) { SetClusterStatus(value); return *this;}
214 
215 
216     /**
217      * <p>The status of the authorization action.</p>
218      */
GetStatus()219     inline const AuthorizationStatus& GetStatus() const{ return m_status; }
220 
221     /**
222      * <p>The status of the authorization action.</p>
223      */
SetStatus(const AuthorizationStatus & value)224     inline void SetStatus(const AuthorizationStatus& value) { m_status = value; }
225 
226     /**
227      * <p>The status of the authorization action.</p>
228      */
SetStatus(AuthorizationStatus && value)229     inline void SetStatus(AuthorizationStatus&& value) { m_status = std::move(value); }
230 
231     /**
232      * <p>The status of the authorization action.</p>
233      */
WithStatus(const AuthorizationStatus & value)234     inline AuthorizeEndpointAccessResult& WithStatus(const AuthorizationStatus& value) { SetStatus(value); return *this;}
235 
236     /**
237      * <p>The status of the authorization action.</p>
238      */
WithStatus(AuthorizationStatus && value)239     inline AuthorizeEndpointAccessResult& WithStatus(AuthorizationStatus&& value) { SetStatus(std::move(value)); return *this;}
240 
241 
242     /**
243      * <p>Indicates whether all VPCs in the grantee account are allowed access to the
244      * cluster.</p>
245      */
GetAllowedAllVPCs()246     inline bool GetAllowedAllVPCs() const{ return m_allowedAllVPCs; }
247 
248     /**
249      * <p>Indicates whether all VPCs in the grantee account are allowed access to the
250      * cluster.</p>
251      */
SetAllowedAllVPCs(bool value)252     inline void SetAllowedAllVPCs(bool value) { m_allowedAllVPCs = value; }
253 
254     /**
255      * <p>Indicates whether all VPCs in the grantee account are allowed access to the
256      * cluster.</p>
257      */
WithAllowedAllVPCs(bool value)258     inline AuthorizeEndpointAccessResult& WithAllowedAllVPCs(bool value) { SetAllowedAllVPCs(value); return *this;}
259 
260 
261     /**
262      * <p>The VPCs allowed access to the cluster.</p>
263      */
GetAllowedVPCs()264     inline const Aws::Vector<Aws::String>& GetAllowedVPCs() const{ return m_allowedVPCs; }
265 
266     /**
267      * <p>The VPCs allowed access to the cluster.</p>
268      */
SetAllowedVPCs(const Aws::Vector<Aws::String> & value)269     inline void SetAllowedVPCs(const Aws::Vector<Aws::String>& value) { m_allowedVPCs = value; }
270 
271     /**
272      * <p>The VPCs allowed access to the cluster.</p>
273      */
SetAllowedVPCs(Aws::Vector<Aws::String> && value)274     inline void SetAllowedVPCs(Aws::Vector<Aws::String>&& value) { m_allowedVPCs = std::move(value); }
275 
276     /**
277      * <p>The VPCs allowed access to the cluster.</p>
278      */
WithAllowedVPCs(const Aws::Vector<Aws::String> & value)279     inline AuthorizeEndpointAccessResult& WithAllowedVPCs(const Aws::Vector<Aws::String>& value) { SetAllowedVPCs(value); return *this;}
280 
281     /**
282      * <p>The VPCs allowed access to the cluster.</p>
283      */
WithAllowedVPCs(Aws::Vector<Aws::String> && value)284     inline AuthorizeEndpointAccessResult& WithAllowedVPCs(Aws::Vector<Aws::String>&& value) { SetAllowedVPCs(std::move(value)); return *this;}
285 
286     /**
287      * <p>The VPCs allowed access to the cluster.</p>
288      */
AddAllowedVPCs(const Aws::String & value)289     inline AuthorizeEndpointAccessResult& AddAllowedVPCs(const Aws::String& value) { m_allowedVPCs.push_back(value); return *this; }
290 
291     /**
292      * <p>The VPCs allowed access to the cluster.</p>
293      */
AddAllowedVPCs(Aws::String && value)294     inline AuthorizeEndpointAccessResult& AddAllowedVPCs(Aws::String&& value) { m_allowedVPCs.push_back(std::move(value)); return *this; }
295 
296     /**
297      * <p>The VPCs allowed access to the cluster.</p>
298      */
AddAllowedVPCs(const char * value)299     inline AuthorizeEndpointAccessResult& AddAllowedVPCs(const char* value) { m_allowedVPCs.push_back(value); return *this; }
300 
301 
302     /**
303      * <p>The number of Redshift-managed VPC endpoints created for the
304      * authorization.</p>
305      */
GetEndpointCount()306     inline int GetEndpointCount() const{ return m_endpointCount; }
307 
308     /**
309      * <p>The number of Redshift-managed VPC endpoints created for the
310      * authorization.</p>
311      */
SetEndpointCount(int value)312     inline void SetEndpointCount(int value) { m_endpointCount = value; }
313 
314     /**
315      * <p>The number of Redshift-managed VPC endpoints created for the
316      * authorization.</p>
317      */
WithEndpointCount(int value)318     inline AuthorizeEndpointAccessResult& WithEndpointCount(int value) { SetEndpointCount(value); return *this;}
319 
320 
321 
GetResponseMetadata()322     inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
323 
324 
SetResponseMetadata(const ResponseMetadata & value)325     inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }
326 
327 
SetResponseMetadata(ResponseMetadata && value)328     inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }
329 
330 
WithResponseMetadata(const ResponseMetadata & value)331     inline AuthorizeEndpointAccessResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
332 
333 
WithResponseMetadata(ResponseMetadata && value)334     inline AuthorizeEndpointAccessResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
335 
336   private:
337 
338     Aws::String m_grantor;
339 
340     Aws::String m_grantee;
341 
342     Aws::String m_clusterIdentifier;
343 
344     Aws::Utils::DateTime m_authorizeTime;
345 
346     Aws::String m_clusterStatus;
347 
348     AuthorizationStatus m_status;
349 
350     bool m_allowedAllVPCs;
351 
352     Aws::Vector<Aws::String> m_allowedVPCs;
353 
354     int m_endpointCount;
355 
356     ResponseMetadata m_responseMetadata;
357   };
358 
359 } // namespace Model
360 } // namespace Redshift
361 } // namespace Aws
362