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/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace Redshift
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>An Identity and Access Management (IAM) role that can be used by the
28    * associated Amazon Redshift cluster to access other Amazon Web Services
29    * services.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ClusterIamRole">AWS
31    * API Reference</a></p>
32    */
33   class AWS_REDSHIFT_API ClusterIamRole
34   {
35   public:
36     ClusterIamRole();
37     ClusterIamRole(const Aws::Utils::Xml::XmlNode& xmlNode);
38     ClusterIamRole& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41     void OutputToStream(Aws::OStream& oStream, const char* location) const;
42 
43 
44     /**
45      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
46      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
47      */
GetIamRoleArn()48     inline const Aws::String& GetIamRoleArn() const{ return m_iamRoleArn; }
49 
50     /**
51      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
52      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
53      */
IamRoleArnHasBeenSet()54     inline bool IamRoleArnHasBeenSet() const { return m_iamRoleArnHasBeenSet; }
55 
56     /**
57      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
58      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
59      */
SetIamRoleArn(const Aws::String & value)60     inline void SetIamRoleArn(const Aws::String& value) { m_iamRoleArnHasBeenSet = true; m_iamRoleArn = value; }
61 
62     /**
63      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
64      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
65      */
SetIamRoleArn(Aws::String && value)66     inline void SetIamRoleArn(Aws::String&& value) { m_iamRoleArnHasBeenSet = true; m_iamRoleArn = std::move(value); }
67 
68     /**
69      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
70      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
71      */
SetIamRoleArn(const char * value)72     inline void SetIamRoleArn(const char* value) { m_iamRoleArnHasBeenSet = true; m_iamRoleArn.assign(value); }
73 
74     /**
75      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
76      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
77      */
WithIamRoleArn(const Aws::String & value)78     inline ClusterIamRole& WithIamRoleArn(const Aws::String& value) { SetIamRoleArn(value); return *this;}
79 
80     /**
81      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
82      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
83      */
WithIamRoleArn(Aws::String && value)84     inline ClusterIamRole& WithIamRoleArn(Aws::String&& value) { SetIamRoleArn(std::move(value)); return *this;}
85 
86     /**
87      * <p>The Amazon Resource Name (ARN) of the IAM role, for example,
88      * <code>arn:aws:iam::123456789012:role/RedshiftCopyUnload</code>. </p>
89      */
WithIamRoleArn(const char * value)90     inline ClusterIamRole& WithIamRoleArn(const char* value) { SetIamRoleArn(value); return *this;}
91 
92 
93     /**
94      * <p>A value that describes the status of the IAM role's association with an
95      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
96      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
97      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
98      * process of being associated with the cluster.</p> </li> <li> <p>
99      * <code>removing</code>: The role is in the process of being disassociated with
100      * the cluster.</p> </li> </ul>
101      */
GetApplyStatus()102     inline const Aws::String& GetApplyStatus() const{ return m_applyStatus; }
103 
104     /**
105      * <p>A value that describes the status of the IAM role's association with an
106      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
107      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
108      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
109      * process of being associated with the cluster.</p> </li> <li> <p>
110      * <code>removing</code>: The role is in the process of being disassociated with
111      * the cluster.</p> </li> </ul>
112      */
ApplyStatusHasBeenSet()113     inline bool ApplyStatusHasBeenSet() const { return m_applyStatusHasBeenSet; }
114 
115     /**
116      * <p>A value that describes the status of the IAM role's association with an
117      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
118      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
119      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
120      * process of being associated with the cluster.</p> </li> <li> <p>
121      * <code>removing</code>: The role is in the process of being disassociated with
122      * the cluster.</p> </li> </ul>
123      */
SetApplyStatus(const Aws::String & value)124     inline void SetApplyStatus(const Aws::String& value) { m_applyStatusHasBeenSet = true; m_applyStatus = value; }
125 
126     /**
127      * <p>A value that describes the status of the IAM role's association with an
128      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
129      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
130      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
131      * process of being associated with the cluster.</p> </li> <li> <p>
132      * <code>removing</code>: The role is in the process of being disassociated with
133      * the cluster.</p> </li> </ul>
134      */
SetApplyStatus(Aws::String && value)135     inline void SetApplyStatus(Aws::String&& value) { m_applyStatusHasBeenSet = true; m_applyStatus = std::move(value); }
136 
137     /**
138      * <p>A value that describes the status of the IAM role's association with an
139      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
140      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
141      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
142      * process of being associated with the cluster.</p> </li> <li> <p>
143      * <code>removing</code>: The role is in the process of being disassociated with
144      * the cluster.</p> </li> </ul>
145      */
SetApplyStatus(const char * value)146     inline void SetApplyStatus(const char* value) { m_applyStatusHasBeenSet = true; m_applyStatus.assign(value); }
147 
148     /**
149      * <p>A value that describes the status of the IAM role's association with an
150      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
151      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
152      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
153      * process of being associated with the cluster.</p> </li> <li> <p>
154      * <code>removing</code>: The role is in the process of being disassociated with
155      * the cluster.</p> </li> </ul>
156      */
WithApplyStatus(const Aws::String & value)157     inline ClusterIamRole& WithApplyStatus(const Aws::String& value) { SetApplyStatus(value); return *this;}
158 
159     /**
160      * <p>A value that describes the status of the IAM role's association with an
161      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
162      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
163      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
164      * process of being associated with the cluster.</p> </li> <li> <p>
165      * <code>removing</code>: The role is in the process of being disassociated with
166      * the cluster.</p> </li> </ul>
167      */
WithApplyStatus(Aws::String && value)168     inline ClusterIamRole& WithApplyStatus(Aws::String&& value) { SetApplyStatus(std::move(value)); return *this;}
169 
170     /**
171      * <p>A value that describes the status of the IAM role's association with an
172      * Amazon Redshift cluster.</p> <p>The following are possible statuses and
173      * descriptions.</p> <ul> <li> <p> <code>in-sync</code>: The role is available for
174      * use by the cluster.</p> </li> <li> <p> <code>adding</code>: The role is in the
175      * process of being associated with the cluster.</p> </li> <li> <p>
176      * <code>removing</code>: The role is in the process of being disassociated with
177      * the cluster.</p> </li> </ul>
178      */
WithApplyStatus(const char * value)179     inline ClusterIamRole& WithApplyStatus(const char* value) { SetApplyStatus(value); return *this;}
180 
181   private:
182 
183     Aws::String m_iamRoleArn;
184     bool m_iamRoleArnHasBeenSet;
185 
186     Aws::String m_applyStatus;
187     bool m_applyStatusHasBeenSet;
188   };
189 
190 } // namespace Model
191 } // namespace Redshift
192 } // namespace Aws
193