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 <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 Macie2
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Provides information about an Amazon Web Services account and entity that
28    * performed an action on an affected resource. The action was performed using the
29    * credentials for your Amazon Web Services account.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/macie2-2020-01-01/UserIdentityRoot">AWS
31    * API Reference</a></p>
32    */
33   class AWS_MACIE2_API UserIdentityRoot
34   {
35   public:
36     UserIdentityRoot();
37     UserIdentityRoot(Aws::Utils::Json::JsonView jsonValue);
38     UserIdentityRoot& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The unique identifier for the Amazon Web Services account.</p>
44      */
GetAccountId()45     inline const Aws::String& GetAccountId() const{ return m_accountId; }
46 
47     /**
48      * <p>The unique identifier for the Amazon Web Services account.</p>
49      */
AccountIdHasBeenSet()50     inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
51 
52     /**
53      * <p>The unique identifier for the Amazon Web Services account.</p>
54      */
SetAccountId(const Aws::String & value)55     inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
56 
57     /**
58      * <p>The unique identifier for the Amazon Web Services account.</p>
59      */
SetAccountId(Aws::String && value)60     inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
61 
62     /**
63      * <p>The unique identifier for the Amazon Web Services account.</p>
64      */
SetAccountId(const char * value)65     inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
66 
67     /**
68      * <p>The unique identifier for the Amazon Web Services account.</p>
69      */
WithAccountId(const Aws::String & value)70     inline UserIdentityRoot& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
71 
72     /**
73      * <p>The unique identifier for the Amazon Web Services account.</p>
74      */
WithAccountId(Aws::String && value)75     inline UserIdentityRoot& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
76 
77     /**
78      * <p>The unique identifier for the Amazon Web Services account.</p>
79      */
WithAccountId(const char * value)80     inline UserIdentityRoot& WithAccountId(const char* value) { SetAccountId(value); return *this;}
81 
82 
83     /**
84      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
85      * The last section of the ARN contains the name of the user or role that performed
86      * the action.</p>
87      */
GetArn()88     inline const Aws::String& GetArn() const{ return m_arn; }
89 
90     /**
91      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
92      * The last section of the ARN contains the name of the user or role that performed
93      * the action.</p>
94      */
ArnHasBeenSet()95     inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
96 
97     /**
98      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
99      * The last section of the ARN contains the name of the user or role that performed
100      * the action.</p>
101      */
SetArn(const Aws::String & value)102     inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
103 
104     /**
105      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
106      * The last section of the ARN contains the name of the user or role that performed
107      * the action.</p>
108      */
SetArn(Aws::String && value)109     inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
110 
111     /**
112      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
113      * The last section of the ARN contains the name of the user or role that performed
114      * the action.</p>
115      */
SetArn(const char * value)116     inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
117 
118     /**
119      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
120      * The last section of the ARN contains the name of the user or role that performed
121      * the action.</p>
122      */
WithArn(const Aws::String & value)123     inline UserIdentityRoot& WithArn(const Aws::String& value) { SetArn(value); return *this;}
124 
125     /**
126      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
127      * The last section of the ARN contains the name of the user or role that performed
128      * the action.</p>
129      */
WithArn(Aws::String && value)130     inline UserIdentityRoot& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
131 
132     /**
133      * <p>The Amazon Resource Name (ARN) of the principal that performed the action.
134      * The last section of the ARN contains the name of the user or role that performed
135      * the action.</p>
136      */
WithArn(const char * value)137     inline UserIdentityRoot& WithArn(const char* value) { SetArn(value); return *this;}
138 
139 
140     /**
141      * <p>The unique identifier for the entity that performed the action.</p>
142      */
GetPrincipalId()143     inline const Aws::String& GetPrincipalId() const{ return m_principalId; }
144 
145     /**
146      * <p>The unique identifier for the entity that performed the action.</p>
147      */
PrincipalIdHasBeenSet()148     inline bool PrincipalIdHasBeenSet() const { return m_principalIdHasBeenSet; }
149 
150     /**
151      * <p>The unique identifier for the entity that performed the action.</p>
152      */
SetPrincipalId(const Aws::String & value)153     inline void SetPrincipalId(const Aws::String& value) { m_principalIdHasBeenSet = true; m_principalId = value; }
154 
155     /**
156      * <p>The unique identifier for the entity that performed the action.</p>
157      */
SetPrincipalId(Aws::String && value)158     inline void SetPrincipalId(Aws::String&& value) { m_principalIdHasBeenSet = true; m_principalId = std::move(value); }
159 
160     /**
161      * <p>The unique identifier for the entity that performed the action.</p>
162      */
SetPrincipalId(const char * value)163     inline void SetPrincipalId(const char* value) { m_principalIdHasBeenSet = true; m_principalId.assign(value); }
164 
165     /**
166      * <p>The unique identifier for the entity that performed the action.</p>
167      */
WithPrincipalId(const Aws::String & value)168     inline UserIdentityRoot& WithPrincipalId(const Aws::String& value) { SetPrincipalId(value); return *this;}
169 
170     /**
171      * <p>The unique identifier for the entity that performed the action.</p>
172      */
WithPrincipalId(Aws::String && value)173     inline UserIdentityRoot& WithPrincipalId(Aws::String&& value) { SetPrincipalId(std::move(value)); return *this;}
174 
175     /**
176      * <p>The unique identifier for the entity that performed the action.</p>
177      */
WithPrincipalId(const char * value)178     inline UserIdentityRoot& WithPrincipalId(const char* value) { SetPrincipalId(value); return *this;}
179 
180   private:
181 
182     Aws::String m_accountId;
183     bool m_accountIdHasBeenSet;
184 
185     Aws::String m_arn;
186     bool m_arnHasBeenSet;
187 
188     Aws::String m_principalId;
189     bool m_principalIdHasBeenSet;
190   };
191 
192 } // namespace Model
193 } // namespace Macie2
194 } // namespace Aws
195