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/opsworks/OpsWorks_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 OpsWorks
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Describes a user's SSH information.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/UserProfile">AWS
29    * API Reference</a></p>
30    */
31   class AWS_OPSWORKS_API UserProfile
32   {
33   public:
34     UserProfile();
35     UserProfile(Aws::Utils::Json::JsonView jsonValue);
36     UserProfile& operator=(Aws::Utils::Json::JsonView jsonValue);
37     Aws::Utils::Json::JsonValue Jsonize() const;
38 
39 
40     /**
41      * <p>The user's IAM ARN.</p>
42      */
GetIamUserArn()43     inline const Aws::String& GetIamUserArn() const{ return m_iamUserArn; }
44 
45     /**
46      * <p>The user's IAM ARN.</p>
47      */
IamUserArnHasBeenSet()48     inline bool IamUserArnHasBeenSet() const { return m_iamUserArnHasBeenSet; }
49 
50     /**
51      * <p>The user's IAM ARN.</p>
52      */
SetIamUserArn(const Aws::String & value)53     inline void SetIamUserArn(const Aws::String& value) { m_iamUserArnHasBeenSet = true; m_iamUserArn = value; }
54 
55     /**
56      * <p>The user's IAM ARN.</p>
57      */
SetIamUserArn(Aws::String && value)58     inline void SetIamUserArn(Aws::String&& value) { m_iamUserArnHasBeenSet = true; m_iamUserArn = std::move(value); }
59 
60     /**
61      * <p>The user's IAM ARN.</p>
62      */
SetIamUserArn(const char * value)63     inline void SetIamUserArn(const char* value) { m_iamUserArnHasBeenSet = true; m_iamUserArn.assign(value); }
64 
65     /**
66      * <p>The user's IAM ARN.</p>
67      */
WithIamUserArn(const Aws::String & value)68     inline UserProfile& WithIamUserArn(const Aws::String& value) { SetIamUserArn(value); return *this;}
69 
70     /**
71      * <p>The user's IAM ARN.</p>
72      */
WithIamUserArn(Aws::String && value)73     inline UserProfile& WithIamUserArn(Aws::String&& value) { SetIamUserArn(std::move(value)); return *this;}
74 
75     /**
76      * <p>The user's IAM ARN.</p>
77      */
WithIamUserArn(const char * value)78     inline UserProfile& WithIamUserArn(const char* value) { SetIamUserArn(value); return *this;}
79 
80 
81     /**
82      * <p>The user's name.</p>
83      */
GetName()84     inline const Aws::String& GetName() const{ return m_name; }
85 
86     /**
87      * <p>The user's name.</p>
88      */
NameHasBeenSet()89     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
90 
91     /**
92      * <p>The user's name.</p>
93      */
SetName(const Aws::String & value)94     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
95 
96     /**
97      * <p>The user's name.</p>
98      */
SetName(Aws::String && value)99     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
100 
101     /**
102      * <p>The user's name.</p>
103      */
SetName(const char * value)104     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
105 
106     /**
107      * <p>The user's name.</p>
108      */
WithName(const Aws::String & value)109     inline UserProfile& WithName(const Aws::String& value) { SetName(value); return *this;}
110 
111     /**
112      * <p>The user's name.</p>
113      */
WithName(Aws::String && value)114     inline UserProfile& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
115 
116     /**
117      * <p>The user's name.</p>
118      */
WithName(const char * value)119     inline UserProfile& WithName(const char* value) { SetName(value); return *this;}
120 
121 
122     /**
123      * <p>The user's SSH user name.</p>
124      */
GetSshUsername()125     inline const Aws::String& GetSshUsername() const{ return m_sshUsername; }
126 
127     /**
128      * <p>The user's SSH user name.</p>
129      */
SshUsernameHasBeenSet()130     inline bool SshUsernameHasBeenSet() const { return m_sshUsernameHasBeenSet; }
131 
132     /**
133      * <p>The user's SSH user name.</p>
134      */
SetSshUsername(const Aws::String & value)135     inline void SetSshUsername(const Aws::String& value) { m_sshUsernameHasBeenSet = true; m_sshUsername = value; }
136 
137     /**
138      * <p>The user's SSH user name.</p>
139      */
SetSshUsername(Aws::String && value)140     inline void SetSshUsername(Aws::String&& value) { m_sshUsernameHasBeenSet = true; m_sshUsername = std::move(value); }
141 
142     /**
143      * <p>The user's SSH user name.</p>
144      */
SetSshUsername(const char * value)145     inline void SetSshUsername(const char* value) { m_sshUsernameHasBeenSet = true; m_sshUsername.assign(value); }
146 
147     /**
148      * <p>The user's SSH user name.</p>
149      */
WithSshUsername(const Aws::String & value)150     inline UserProfile& WithSshUsername(const Aws::String& value) { SetSshUsername(value); return *this;}
151 
152     /**
153      * <p>The user's SSH user name.</p>
154      */
WithSshUsername(Aws::String && value)155     inline UserProfile& WithSshUsername(Aws::String&& value) { SetSshUsername(std::move(value)); return *this;}
156 
157     /**
158      * <p>The user's SSH user name.</p>
159      */
WithSshUsername(const char * value)160     inline UserProfile& WithSshUsername(const char* value) { SetSshUsername(value); return *this;}
161 
162 
163     /**
164      * <p>The user's SSH public key.</p>
165      */
GetSshPublicKey()166     inline const Aws::String& GetSshPublicKey() const{ return m_sshPublicKey; }
167 
168     /**
169      * <p>The user's SSH public key.</p>
170      */
SshPublicKeyHasBeenSet()171     inline bool SshPublicKeyHasBeenSet() const { return m_sshPublicKeyHasBeenSet; }
172 
173     /**
174      * <p>The user's SSH public key.</p>
175      */
SetSshPublicKey(const Aws::String & value)176     inline void SetSshPublicKey(const Aws::String& value) { m_sshPublicKeyHasBeenSet = true; m_sshPublicKey = value; }
177 
178     /**
179      * <p>The user's SSH public key.</p>
180      */
SetSshPublicKey(Aws::String && value)181     inline void SetSshPublicKey(Aws::String&& value) { m_sshPublicKeyHasBeenSet = true; m_sshPublicKey = std::move(value); }
182 
183     /**
184      * <p>The user's SSH public key.</p>
185      */
SetSshPublicKey(const char * value)186     inline void SetSshPublicKey(const char* value) { m_sshPublicKeyHasBeenSet = true; m_sshPublicKey.assign(value); }
187 
188     /**
189      * <p>The user's SSH public key.</p>
190      */
WithSshPublicKey(const Aws::String & value)191     inline UserProfile& WithSshPublicKey(const Aws::String& value) { SetSshPublicKey(value); return *this;}
192 
193     /**
194      * <p>The user's SSH public key.</p>
195      */
WithSshPublicKey(Aws::String && value)196     inline UserProfile& WithSshPublicKey(Aws::String&& value) { SetSshPublicKey(std::move(value)); return *this;}
197 
198     /**
199      * <p>The user's SSH public key.</p>
200      */
WithSshPublicKey(const char * value)201     inline UserProfile& WithSshPublicKey(const char* value) { SetSshPublicKey(value); return *this;}
202 
203 
204     /**
205      * <p>Whether users can specify their own SSH public key through the My Settings
206      * page. For more information, see <a
207      * href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing
208      * User Permissions</a>.</p>
209      */
GetAllowSelfManagement()210     inline bool GetAllowSelfManagement() const{ return m_allowSelfManagement; }
211 
212     /**
213      * <p>Whether users can specify their own SSH public key through the My Settings
214      * page. For more information, see <a
215      * href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing
216      * User Permissions</a>.</p>
217      */
AllowSelfManagementHasBeenSet()218     inline bool AllowSelfManagementHasBeenSet() const { return m_allowSelfManagementHasBeenSet; }
219 
220     /**
221      * <p>Whether users can specify their own SSH public key through the My Settings
222      * page. For more information, see <a
223      * href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing
224      * User Permissions</a>.</p>
225      */
SetAllowSelfManagement(bool value)226     inline void SetAllowSelfManagement(bool value) { m_allowSelfManagementHasBeenSet = true; m_allowSelfManagement = value; }
227 
228     /**
229      * <p>Whether users can specify their own SSH public key through the My Settings
230      * page. For more information, see <a
231      * href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing
232      * User Permissions</a>.</p>
233      */
WithAllowSelfManagement(bool value)234     inline UserProfile& WithAllowSelfManagement(bool value) { SetAllowSelfManagement(value); return *this;}
235 
236   private:
237 
238     Aws::String m_iamUserArn;
239     bool m_iamUserArnHasBeenSet;
240 
241     Aws::String m_name;
242     bool m_nameHasBeenSet;
243 
244     Aws::String m_sshUsername;
245     bool m_sshUsernameHasBeenSet;
246 
247     Aws::String m_sshPublicKey;
248     bool m_sshPublicKeyHasBeenSet;
249 
250     bool m_allowSelfManagement;
251     bool m_allowSelfManagementHasBeenSet;
252   };
253 
254 } // namespace Model
255 } // namespace OpsWorks
256 } // namespace Aws
257