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/macie2/Macie2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/macie2/model/SessionContext.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace Macie2
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Provides information about an identity that performed an action on an
29    * affected resource by using temporary security credentials. The credentials were
30    * obtained using the AssumeRole operation of the Security Token Service (STS)
31    * API.</p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/macie2-2020-01-01/AssumedRole">AWS
33    * API Reference</a></p>
34    */
35   class AWS_MACIE2_API AssumedRole
36   {
37   public:
38     AssumedRole();
39     AssumedRole(Aws::Utils::Json::JsonView jsonValue);
40     AssumedRole& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
46      */
GetAccessKeyId()47     inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; }
48 
49     /**
50      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
51      */
AccessKeyIdHasBeenSet()52     inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; }
53 
54     /**
55      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
56      */
SetAccessKeyId(const Aws::String & value)57     inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
58 
59     /**
60      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
61      */
SetAccessKeyId(Aws::String && value)62     inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); }
63 
64     /**
65      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
66      */
SetAccessKeyId(const char * value)67     inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); }
68 
69     /**
70      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
71      */
WithAccessKeyId(const Aws::String & value)72     inline AssumedRole& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;}
73 
74     /**
75      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
76      */
WithAccessKeyId(Aws::String && value)77     inline AssumedRole& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;}
78 
79     /**
80      * <p>The Amazon Web Services access key ID that identifies the credentials.</p>
81      */
WithAccessKeyId(const char * value)82     inline AssumedRole& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;}
83 
84 
85     /**
86      * <p>The unique identifier for the Amazon Web Services account that owns the
87      * entity that was used to get the credentials.</p>
88      */
GetAccountId()89     inline const Aws::String& GetAccountId() const{ return m_accountId; }
90 
91     /**
92      * <p>The unique identifier for the Amazon Web Services account that owns the
93      * entity that was used to get the credentials.</p>
94      */
AccountIdHasBeenSet()95     inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
96 
97     /**
98      * <p>The unique identifier for the Amazon Web Services account that owns the
99      * entity that was used to get the credentials.</p>
100      */
SetAccountId(const Aws::String & value)101     inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
102 
103     /**
104      * <p>The unique identifier for the Amazon Web Services account that owns the
105      * entity that was used to get the credentials.</p>
106      */
SetAccountId(Aws::String && value)107     inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
108 
109     /**
110      * <p>The unique identifier for the Amazon Web Services account that owns the
111      * entity that was used to get the credentials.</p>
112      */
SetAccountId(const char * value)113     inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
114 
115     /**
116      * <p>The unique identifier for the Amazon Web Services account that owns the
117      * entity that was used to get the credentials.</p>
118      */
WithAccountId(const Aws::String & value)119     inline AssumedRole& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
120 
121     /**
122      * <p>The unique identifier for the Amazon Web Services account that owns the
123      * entity that was used to get the credentials.</p>
124      */
WithAccountId(Aws::String && value)125     inline AssumedRole& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
126 
127     /**
128      * <p>The unique identifier for the Amazon Web Services account that owns the
129      * entity that was used to get the credentials.</p>
130      */
WithAccountId(const char * value)131     inline AssumedRole& WithAccountId(const char* value) { SetAccountId(value); return *this;}
132 
133 
134     /**
135      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
136      * credentials.</p>
137      */
GetArn()138     inline const Aws::String& GetArn() const{ return m_arn; }
139 
140     /**
141      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
142      * credentials.</p>
143      */
ArnHasBeenSet()144     inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
145 
146     /**
147      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
148      * credentials.</p>
149      */
SetArn(const Aws::String & value)150     inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
151 
152     /**
153      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
154      * credentials.</p>
155      */
SetArn(Aws::String && value)156     inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
157 
158     /**
159      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
160      * credentials.</p>
161      */
SetArn(const char * value)162     inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
163 
164     /**
165      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
166      * credentials.</p>
167      */
WithArn(const Aws::String & value)168     inline AssumedRole& WithArn(const Aws::String& value) { SetArn(value); return *this;}
169 
170     /**
171      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
172      * credentials.</p>
173      */
WithArn(Aws::String && value)174     inline AssumedRole& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
175 
176     /**
177      * <p>The Amazon Resource Name (ARN) of the entity that was used to get the
178      * credentials.</p>
179      */
WithArn(const char * value)180     inline AssumedRole& WithArn(const char* value) { SetArn(value); return *this;}
181 
182 
183     /**
184      * <p>The unique identifier for the entity that was used to get the
185      * credentials.</p>
186      */
GetPrincipalId()187     inline const Aws::String& GetPrincipalId() const{ return m_principalId; }
188 
189     /**
190      * <p>The unique identifier for the entity that was used to get the
191      * credentials.</p>
192      */
PrincipalIdHasBeenSet()193     inline bool PrincipalIdHasBeenSet() const { return m_principalIdHasBeenSet; }
194 
195     /**
196      * <p>The unique identifier for the entity that was used to get the
197      * credentials.</p>
198      */
SetPrincipalId(const Aws::String & value)199     inline void SetPrincipalId(const Aws::String& value) { m_principalIdHasBeenSet = true; m_principalId = value; }
200 
201     /**
202      * <p>The unique identifier for the entity that was used to get the
203      * credentials.</p>
204      */
SetPrincipalId(Aws::String && value)205     inline void SetPrincipalId(Aws::String&& value) { m_principalIdHasBeenSet = true; m_principalId = std::move(value); }
206 
207     /**
208      * <p>The unique identifier for the entity that was used to get the
209      * credentials.</p>
210      */
SetPrincipalId(const char * value)211     inline void SetPrincipalId(const char* value) { m_principalIdHasBeenSet = true; m_principalId.assign(value); }
212 
213     /**
214      * <p>The unique identifier for the entity that was used to get the
215      * credentials.</p>
216      */
WithPrincipalId(const Aws::String & value)217     inline AssumedRole& WithPrincipalId(const Aws::String& value) { SetPrincipalId(value); return *this;}
218 
219     /**
220      * <p>The unique identifier for the entity that was used to get the
221      * credentials.</p>
222      */
WithPrincipalId(Aws::String && value)223     inline AssumedRole& WithPrincipalId(Aws::String&& value) { SetPrincipalId(std::move(value)); return *this;}
224 
225     /**
226      * <p>The unique identifier for the entity that was used to get the
227      * credentials.</p>
228      */
WithPrincipalId(const char * value)229     inline AssumedRole& WithPrincipalId(const char* value) { SetPrincipalId(value); return *this;}
230 
231 
232     /**
233      * <p>The details of the session that was created for the credentials, including
234      * the entity that issued the session.</p>
235      */
GetSessionContext()236     inline const SessionContext& GetSessionContext() const{ return m_sessionContext; }
237 
238     /**
239      * <p>The details of the session that was created for the credentials, including
240      * the entity that issued the session.</p>
241      */
SessionContextHasBeenSet()242     inline bool SessionContextHasBeenSet() const { return m_sessionContextHasBeenSet; }
243 
244     /**
245      * <p>The details of the session that was created for the credentials, including
246      * the entity that issued the session.</p>
247      */
SetSessionContext(const SessionContext & value)248     inline void SetSessionContext(const SessionContext& value) { m_sessionContextHasBeenSet = true; m_sessionContext = value; }
249 
250     /**
251      * <p>The details of the session that was created for the credentials, including
252      * the entity that issued the session.</p>
253      */
SetSessionContext(SessionContext && value)254     inline void SetSessionContext(SessionContext&& value) { m_sessionContextHasBeenSet = true; m_sessionContext = std::move(value); }
255 
256     /**
257      * <p>The details of the session that was created for the credentials, including
258      * the entity that issued the session.</p>
259      */
WithSessionContext(const SessionContext & value)260     inline AssumedRole& WithSessionContext(const SessionContext& value) { SetSessionContext(value); return *this;}
261 
262     /**
263      * <p>The details of the session that was created for the credentials, including
264      * the entity that issued the session.</p>
265      */
WithSessionContext(SessionContext && value)266     inline AssumedRole& WithSessionContext(SessionContext&& value) { SetSessionContext(std::move(value)); return *this;}
267 
268   private:
269 
270     Aws::String m_accessKeyId;
271     bool m_accessKeyIdHasBeenSet;
272 
273     Aws::String m_accountId;
274     bool m_accountIdHasBeenSet;
275 
276     Aws::String m_arn;
277     bool m_arnHasBeenSet;
278 
279     Aws::String m_principalId;
280     bool m_principalIdHasBeenSet;
281 
282     SessionContext m_sessionContext;
283     bool m_sessionContextHasBeenSet;
284   };
285 
286 } // namespace Model
287 } // namespace Macie2
288 } // namespace Aws
289