/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace ElastiCache { namespace Model { /** */ class CreateUserRequest : public ElastiCacheRequest { public: AWS_ELASTICACHE_API CreateUserRequest(); // 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 "CreateUser"; } AWS_ELASTICACHE_API Aws::String SerializePayload() const override; protected: AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the user.

*/ inline const Aws::String& GetUserId() const{ return m_userId; } /** *

The ID of the user.

*/ inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } /** *

The ID of the user.

*/ inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } /** *

The ID of the user.

*/ inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } /** *

The ID of the user.

*/ inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } /** *

The ID of the user.

*/ inline CreateUserRequest& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} /** *

The ID of the user.

*/ inline CreateUserRequest& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} /** *

The ID of the user.

*/ inline CreateUserRequest& WithUserId(const char* value) { SetUserId(value); return *this;} /** *

The username of the user.

*/ inline const Aws::String& GetUserName() const{ return m_userName; } /** *

The username of the user.

*/ inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } /** *

The username of the user.

*/ inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } /** *

The username of the user.

*/ inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } /** *

The username of the user.

*/ inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } /** *

The username of the user.

*/ inline CreateUserRequest& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} /** *

The username of the user.

*/ inline CreateUserRequest& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} /** *

The username of the user.

*/ inline CreateUserRequest& WithUserName(const char* value) { SetUserName(value); return *this;} /** *

The current supported value is Redis.

*/ inline const Aws::String& GetEngine() const{ return m_engine; } /** *

The current supported value is Redis.

*/ inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; } /** *

The current supported value is Redis.

*/ inline void SetEngine(const Aws::String& value) { m_engineHasBeenSet = true; m_engine = value; } /** *

The current supported value is Redis.

*/ inline void SetEngine(Aws::String&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); } /** *

The current supported value is Redis.

*/ inline void SetEngine(const char* value) { m_engineHasBeenSet = true; m_engine.assign(value); } /** *

The current supported value is Redis.

*/ inline CreateUserRequest& WithEngine(const Aws::String& value) { SetEngine(value); return *this;} /** *

The current supported value is Redis.

*/ inline CreateUserRequest& WithEngine(Aws::String&& value) { SetEngine(std::move(value)); return *this;} /** *

The current supported value is Redis.

*/ inline CreateUserRequest& WithEngine(const char* value) { SetEngine(value); return *this;} /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline const Aws::Vector& GetPasswords() const{ return m_passwords; } /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline bool PasswordsHasBeenSet() const { return m_passwordsHasBeenSet; } /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline void SetPasswords(const Aws::Vector& value) { m_passwordsHasBeenSet = true; m_passwords = value; } /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline void SetPasswords(Aws::Vector&& value) { m_passwordsHasBeenSet = true; m_passwords = std::move(value); } /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline CreateUserRequest& WithPasswords(const Aws::Vector& value) { SetPasswords(value); return *this;} /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline CreateUserRequest& WithPasswords(Aws::Vector&& value) { SetPasswords(std::move(value)); return *this;} /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline CreateUserRequest& AddPasswords(const Aws::String& value) { m_passwordsHasBeenSet = true; m_passwords.push_back(value); return *this; } /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline CreateUserRequest& AddPasswords(Aws::String&& value) { m_passwordsHasBeenSet = true; m_passwords.push_back(std::move(value)); return *this; } /** *

Passwords used for this user. You can create up to two passwords for each * user.

*/ inline CreateUserRequest& AddPasswords(const char* value) { m_passwordsHasBeenSet = true; m_passwords.push_back(value); return *this; } /** *

Access permissions string used for this user.

*/ inline const Aws::String& GetAccessString() const{ return m_accessString; } /** *

Access permissions string used for this user.

*/ inline bool AccessStringHasBeenSet() const { return m_accessStringHasBeenSet; } /** *

Access permissions string used for this user.

*/ inline void SetAccessString(const Aws::String& value) { m_accessStringHasBeenSet = true; m_accessString = value; } /** *

Access permissions string used for this user.

*/ inline void SetAccessString(Aws::String&& value) { m_accessStringHasBeenSet = true; m_accessString = std::move(value); } /** *

Access permissions string used for this user.

*/ inline void SetAccessString(const char* value) { m_accessStringHasBeenSet = true; m_accessString.assign(value); } /** *

Access permissions string used for this user.

*/ inline CreateUserRequest& WithAccessString(const Aws::String& value) { SetAccessString(value); return *this;} /** *

Access permissions string used for this user.

*/ inline CreateUserRequest& WithAccessString(Aws::String&& value) { SetAccessString(std::move(value)); return *this;} /** *

Access permissions string used for this user.

*/ inline CreateUserRequest& WithAccessString(const char* value) { SetAccessString(value); return *this;} /** *

Indicates a password is not required for this user.

*/ inline bool GetNoPasswordRequired() const{ return m_noPasswordRequired; } /** *

Indicates a password is not required for this user.

*/ inline bool NoPasswordRequiredHasBeenSet() const { return m_noPasswordRequiredHasBeenSet; } /** *

Indicates a password is not required for this user.

*/ inline void SetNoPasswordRequired(bool value) { m_noPasswordRequiredHasBeenSet = true; m_noPasswordRequired = value; } /** *

Indicates a password is not required for this user.

*/ inline CreateUserRequest& WithNoPasswordRequired(bool value) { SetNoPasswordRequired(value); return *this;} /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline CreateUserRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline CreateUserRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline CreateUserRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.

*/ inline CreateUserRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

Specifies how to authenticate the user.

*/ inline const AuthenticationMode& GetAuthenticationMode() const{ return m_authenticationMode; } /** *

Specifies how to authenticate the user.

*/ inline bool AuthenticationModeHasBeenSet() const { return m_authenticationModeHasBeenSet; } /** *

Specifies how to authenticate the user.

*/ inline void SetAuthenticationMode(const AuthenticationMode& value) { m_authenticationModeHasBeenSet = true; m_authenticationMode = value; } /** *

Specifies how to authenticate the user.

*/ inline void SetAuthenticationMode(AuthenticationMode&& value) { m_authenticationModeHasBeenSet = true; m_authenticationMode = std::move(value); } /** *

Specifies how to authenticate the user.

*/ inline CreateUserRequest& WithAuthenticationMode(const AuthenticationMode& value) { SetAuthenticationMode(value); return *this;} /** *

Specifies how to authenticate the user.

*/ inline CreateUserRequest& WithAuthenticationMode(AuthenticationMode&& value) { SetAuthenticationMode(std::move(value)); return *this;} private: Aws::String m_userId; bool m_userIdHasBeenSet = false; Aws::String m_userName; bool m_userNameHasBeenSet = false; Aws::String m_engine; bool m_engineHasBeenSet = false; Aws::Vector m_passwords; bool m_passwordsHasBeenSet = false; Aws::String m_accessString; bool m_accessStringHasBeenSet = false; bool m_noPasswordRequired; bool m_noPasswordRequiredHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; AuthenticationMode m_authenticationMode; bool m_authenticationModeHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws