/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CognitoIdentityProvider { namespace Model { /** *

Represents the request to change a user password.

See Also:

* AWS * API Reference

*/ class ChangePasswordRequest : public CognitoIdentityProviderRequest { public: AWS_COGNITOIDENTITYPROVIDER_API ChangePasswordRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ChangePassword"; } AWS_COGNITOIDENTITYPROVIDER_API Aws::String SerializePayload() const override; AWS_COGNITOIDENTITYPROVIDER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The old password.

*/ inline const Aws::String& GetPreviousPassword() const{ return m_previousPassword; } /** *

The old password.

*/ inline bool PreviousPasswordHasBeenSet() const { return m_previousPasswordHasBeenSet; } /** *

The old password.

*/ inline void SetPreviousPassword(const Aws::String& value) { m_previousPasswordHasBeenSet = true; m_previousPassword = value; } /** *

The old password.

*/ inline void SetPreviousPassword(Aws::String&& value) { m_previousPasswordHasBeenSet = true; m_previousPassword = std::move(value); } /** *

The old password.

*/ inline void SetPreviousPassword(const char* value) { m_previousPasswordHasBeenSet = true; m_previousPassword.assign(value); } /** *

The old password.

*/ inline ChangePasswordRequest& WithPreviousPassword(const Aws::String& value) { SetPreviousPassword(value); return *this;} /** *

The old password.

*/ inline ChangePasswordRequest& WithPreviousPassword(Aws::String&& value) { SetPreviousPassword(std::move(value)); return *this;} /** *

The old password.

*/ inline ChangePasswordRequest& WithPreviousPassword(const char* value) { SetPreviousPassword(value); return *this;} /** *

The new password.

*/ inline const Aws::String& GetProposedPassword() const{ return m_proposedPassword; } /** *

The new password.

*/ inline bool ProposedPasswordHasBeenSet() const { return m_proposedPasswordHasBeenSet; } /** *

The new password.

*/ inline void SetProposedPassword(const Aws::String& value) { m_proposedPasswordHasBeenSet = true; m_proposedPassword = value; } /** *

The new password.

*/ inline void SetProposedPassword(Aws::String&& value) { m_proposedPasswordHasBeenSet = true; m_proposedPassword = std::move(value); } /** *

The new password.

*/ inline void SetProposedPassword(const char* value) { m_proposedPasswordHasBeenSet = true; m_proposedPassword.assign(value); } /** *

The new password.

*/ inline ChangePasswordRequest& WithProposedPassword(const Aws::String& value) { SetProposedPassword(value); return *this;} /** *

The new password.

*/ inline ChangePasswordRequest& WithProposedPassword(Aws::String&& value) { SetProposedPassword(std::move(value)); return *this;} /** *

The new password.

*/ inline ChangePasswordRequest& WithProposedPassword(const char* value) { SetProposedPassword(value); return *this;} /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline const Aws::String& GetAccessToken() const{ return m_accessToken; } /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; } /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; } /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); } /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); } /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline ChangePasswordRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;} /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline ChangePasswordRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;} /** *

A valid access token that Amazon Cognito issued to the user whose password * you want to change.

*/ inline ChangePasswordRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;} private: Aws::String m_previousPassword; bool m_previousPasswordHasBeenSet = false; Aws::String m_proposedPassword; bool m_proposedPasswordHasBeenSet = false; Aws::String m_accessToken; bool m_accessTokenHasBeenSet = false; }; } // namespace Model } // namespace CognitoIdentityProvider } // namespace Aws