AWS SDK for C++  0.14.3
AWS SDK for C++
PasswordPolicy.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/iam/IAM_EXPORTS.h>
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Xml
24 {
25  class XmlNode;
26 } // namespace Xml
27 } // namespace Utils
28 namespace IAM
29 {
30 namespace Model
31 {
32 
39  {
40  public:
43  PasswordPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
51  inline int GetMinimumPasswordLength() const{ return m_minimumPasswordLength; }
52 
56  inline void SetMinimumPasswordLength(int value) { m_minimumPasswordLengthHasBeenSet = true; m_minimumPasswordLength = value; }
57 
61  inline PasswordPolicy& WithMinimumPasswordLength(int value) { SetMinimumPasswordLength(value); return *this;}
62 
66  inline bool GetRequireSymbols() const{ return m_requireSymbols; }
67 
71  inline void SetRequireSymbols(bool value) { m_requireSymbolsHasBeenSet = true; m_requireSymbols = value; }
72 
76  inline PasswordPolicy& WithRequireSymbols(bool value) { SetRequireSymbols(value); return *this;}
77 
81  inline bool GetRequireNumbers() const{ return m_requireNumbers; }
82 
86  inline void SetRequireNumbers(bool value) { m_requireNumbersHasBeenSet = true; m_requireNumbers = value; }
87 
91  inline PasswordPolicy& WithRequireNumbers(bool value) { SetRequireNumbers(value); return *this;}
92 
96  inline bool GetRequireUppercaseCharacters() const{ return m_requireUppercaseCharacters; }
97 
101  inline void SetRequireUppercaseCharacters(bool value) { m_requireUppercaseCharactersHasBeenSet = true; m_requireUppercaseCharacters = value; }
102 
106  inline PasswordPolicy& WithRequireUppercaseCharacters(bool value) { SetRequireUppercaseCharacters(value); return *this;}
107 
111  inline bool GetRequireLowercaseCharacters() const{ return m_requireLowercaseCharacters; }
112 
116  inline void SetRequireLowercaseCharacters(bool value) { m_requireLowercaseCharactersHasBeenSet = true; m_requireLowercaseCharacters = value; }
117 
121  inline PasswordPolicy& WithRequireLowercaseCharacters(bool value) { SetRequireLowercaseCharacters(value); return *this;}
122 
126  inline bool GetAllowUsersToChangePassword() const{ return m_allowUsersToChangePassword; }
127 
131  inline void SetAllowUsersToChangePassword(bool value) { m_allowUsersToChangePasswordHasBeenSet = true; m_allowUsersToChangePassword = value; }
132 
136  inline PasswordPolicy& WithAllowUsersToChangePassword(bool value) { SetAllowUsersToChangePassword(value); return *this;}
137 
143  inline bool GetExpirePasswords() const{ return m_expirePasswords; }
144 
150  inline void SetExpirePasswords(bool value) { m_expirePasswordsHasBeenSet = true; m_expirePasswords = value; }
151 
157  inline PasswordPolicy& WithExpirePasswords(bool value) { SetExpirePasswords(value); return *this;}
158 
162  inline int GetMaxPasswordAge() const{ return m_maxPasswordAge; }
163 
167  inline void SetMaxPasswordAge(int value) { m_maxPasswordAgeHasBeenSet = true; m_maxPasswordAge = value; }
168 
172  inline PasswordPolicy& WithMaxPasswordAge(int value) { SetMaxPasswordAge(value); return *this;}
173 
178  inline int GetPasswordReusePrevention() const{ return m_passwordReusePrevention; }
179 
184  inline void SetPasswordReusePrevention(int value) { m_passwordReusePreventionHasBeenSet = true; m_passwordReusePrevention = value; }
185 
190  inline PasswordPolicy& WithPasswordReusePrevention(int value) { SetPasswordReusePrevention(value); return *this;}
191 
196  inline bool GetHardExpiry() const{ return m_hardExpiry; }
197 
202  inline void SetHardExpiry(bool value) { m_hardExpiryHasBeenSet = true; m_hardExpiry = value; }
203 
208  inline PasswordPolicy& WithHardExpiry(bool value) { SetHardExpiry(value); return *this;}
209 
210  private:
211  int m_minimumPasswordLength;
212  bool m_minimumPasswordLengthHasBeenSet;
213  bool m_requireSymbols;
214  bool m_requireSymbolsHasBeenSet;
215  bool m_requireNumbers;
216  bool m_requireNumbersHasBeenSet;
217  bool m_requireUppercaseCharacters;
218  bool m_requireUppercaseCharactersHasBeenSet;
219  bool m_requireLowercaseCharacters;
220  bool m_requireLowercaseCharactersHasBeenSet;
221  bool m_allowUsersToChangePassword;
222  bool m_allowUsersToChangePasswordHasBeenSet;
223  bool m_expirePasswords;
224  bool m_expirePasswordsHasBeenSet;
225  int m_maxPasswordAge;
226  bool m_maxPasswordAgeHasBeenSet;
227  int m_passwordReusePrevention;
228  bool m_passwordReusePreventionHasBeenSet;
229  bool m_hardExpiry;
230  bool m_hardExpiryHasBeenSet;
231  };
232 
233 } // namespace Model
234 } // namespace IAM
235 } // namespace Aws
PasswordPolicy & WithRequireSymbols(bool value)
PasswordPolicy & WithAllowUsersToChangePassword(bool value)
PasswordPolicy & WithRequireUppercaseCharacters(bool value)
void SetRequireSymbols(bool value)
void SetPasswordReusePrevention(int value)
PasswordPolicy & WithExpirePasswords(bool value)
void SetRequireLowercaseCharacters(bool value)
bool GetAllowUsersToChangePassword() const
void SetRequireNumbers(bool value)
bool GetRequireLowercaseCharacters() const
void SetAllowUsersToChangePassword(bool value)
PasswordPolicy & WithMaxPasswordAge(int value)
bool GetRequireUppercaseCharacters() const
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
PasswordPolicy & WithMinimumPasswordLength(int value)
PasswordPolicy & WithRequireNumbers(bool value)
void SetRequireUppercaseCharacters(bool value)
PasswordPolicy & WithHardExpiry(bool value)
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:37
PasswordPolicy & WithPasswordReusePrevention(int value)
void SetMinimumPasswordLength(int value)
JSON (JavaScript Object Notation).
PasswordPolicy & WithRequireLowercaseCharacters(bool value)