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/cognito-idp/CognitoIdentityProvider_EXPORTS.h> 8 #include <aws/cognito-idp/CognitoIdentityProviderRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace CognitoIdentityProvider 15 { 16 namespace Model 17 { 18 19 /** 20 * <p>Represents the request to change a user password.</p><p><h3>See Also:</h3> 21 * <a 22 * href="http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ChangePasswordRequest">AWS 23 * API Reference</a></p> 24 */ 25 class AWS_COGNITOIDENTITYPROVIDER_API ChangePasswordRequest : public CognitoIdentityProviderRequest 26 { 27 public: 28 ChangePasswordRequest(); 29 30 // Service request name is the Operation name which will send this request out, 31 // each operation should has unique request name, so that we can get operation's name from this request. 32 // Note: this is not true for response, multiple operations may have the same response name, 33 // so we can not get operation's name from response. GetServiceRequestName()34 inline virtual const char* GetServiceRequestName() const override { return "ChangePassword"; } 35 36 Aws::String SerializePayload() const override; 37 38 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 39 40 41 /** 42 * <p>The old password.</p> 43 */ GetPreviousPassword()44 inline const Aws::String& GetPreviousPassword() const{ return m_previousPassword; } 45 46 /** 47 * <p>The old password.</p> 48 */ PreviousPasswordHasBeenSet()49 inline bool PreviousPasswordHasBeenSet() const { return m_previousPasswordHasBeenSet; } 50 51 /** 52 * <p>The old password.</p> 53 */ SetPreviousPassword(const Aws::String & value)54 inline void SetPreviousPassword(const Aws::String& value) { m_previousPasswordHasBeenSet = true; m_previousPassword = value; } 55 56 /** 57 * <p>The old password.</p> 58 */ SetPreviousPassword(Aws::String && value)59 inline void SetPreviousPassword(Aws::String&& value) { m_previousPasswordHasBeenSet = true; m_previousPassword = std::move(value); } 60 61 /** 62 * <p>The old password.</p> 63 */ SetPreviousPassword(const char * value)64 inline void SetPreviousPassword(const char* value) { m_previousPasswordHasBeenSet = true; m_previousPassword.assign(value); } 65 66 /** 67 * <p>The old password.</p> 68 */ WithPreviousPassword(const Aws::String & value)69 inline ChangePasswordRequest& WithPreviousPassword(const Aws::String& value) { SetPreviousPassword(value); return *this;} 70 71 /** 72 * <p>The old password.</p> 73 */ WithPreviousPassword(Aws::String && value)74 inline ChangePasswordRequest& WithPreviousPassword(Aws::String&& value) { SetPreviousPassword(std::move(value)); return *this;} 75 76 /** 77 * <p>The old password.</p> 78 */ WithPreviousPassword(const char * value)79 inline ChangePasswordRequest& WithPreviousPassword(const char* value) { SetPreviousPassword(value); return *this;} 80 81 82 /** 83 * <p>The new password.</p> 84 */ GetProposedPassword()85 inline const Aws::String& GetProposedPassword() const{ return m_proposedPassword; } 86 87 /** 88 * <p>The new password.</p> 89 */ ProposedPasswordHasBeenSet()90 inline bool ProposedPasswordHasBeenSet() const { return m_proposedPasswordHasBeenSet; } 91 92 /** 93 * <p>The new password.</p> 94 */ SetProposedPassword(const Aws::String & value)95 inline void SetProposedPassword(const Aws::String& value) { m_proposedPasswordHasBeenSet = true; m_proposedPassword = value; } 96 97 /** 98 * <p>The new password.</p> 99 */ SetProposedPassword(Aws::String && value)100 inline void SetProposedPassword(Aws::String&& value) { m_proposedPasswordHasBeenSet = true; m_proposedPassword = std::move(value); } 101 102 /** 103 * <p>The new password.</p> 104 */ SetProposedPassword(const char * value)105 inline void SetProposedPassword(const char* value) { m_proposedPasswordHasBeenSet = true; m_proposedPassword.assign(value); } 106 107 /** 108 * <p>The new password.</p> 109 */ WithProposedPassword(const Aws::String & value)110 inline ChangePasswordRequest& WithProposedPassword(const Aws::String& value) { SetProposedPassword(value); return *this;} 111 112 /** 113 * <p>The new password.</p> 114 */ WithProposedPassword(Aws::String && value)115 inline ChangePasswordRequest& WithProposedPassword(Aws::String&& value) { SetProposedPassword(std::move(value)); return *this;} 116 117 /** 118 * <p>The new password.</p> 119 */ WithProposedPassword(const char * value)120 inline ChangePasswordRequest& WithProposedPassword(const char* value) { SetProposedPassword(value); return *this;} 121 122 123 /** 124 * <p>The access token.</p> 125 */ GetAccessToken()126 inline const Aws::String& GetAccessToken() const{ return m_accessToken; } 127 128 /** 129 * <p>The access token.</p> 130 */ AccessTokenHasBeenSet()131 inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; } 132 133 /** 134 * <p>The access token.</p> 135 */ SetAccessToken(const Aws::String & value)136 inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; } 137 138 /** 139 * <p>The access token.</p> 140 */ SetAccessToken(Aws::String && value)141 inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); } 142 143 /** 144 * <p>The access token.</p> 145 */ SetAccessToken(const char * value)146 inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); } 147 148 /** 149 * <p>The access token.</p> 150 */ WithAccessToken(const Aws::String & value)151 inline ChangePasswordRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;} 152 153 /** 154 * <p>The access token.</p> 155 */ WithAccessToken(Aws::String && value)156 inline ChangePasswordRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;} 157 158 /** 159 * <p>The access token.</p> 160 */ WithAccessToken(const char * value)161 inline ChangePasswordRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;} 162 163 private: 164 165 Aws::String m_previousPassword; 166 bool m_previousPasswordHasBeenSet; 167 168 Aws::String m_proposedPassword; 169 bool m_proposedPasswordHasBeenSet; 170 171 Aws::String m_accessToken; 172 bool m_accessTokenHasBeenSet; 173 }; 174 175 } // namespace Model 176 } // namespace CognitoIdentityProvider 177 } // namespace Aws 178