/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace ElastiCache { namespace Model { /** *

Specifies the authentication mode to use.

See Also:

AWS * API Reference

*/ class AuthenticationMode { public: AWS_ELASTICACHE_API AuthenticationMode(); AWS_ELASTICACHE_API AuthenticationMode(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICACHE_API AuthenticationMode& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Specifies the authentication type. Possible options are IAM authentication, * password and no password.

*/ inline const InputAuthenticationType& GetType() const{ return m_type; } /** *

Specifies the authentication type. Possible options are IAM authentication, * password and no password.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Specifies the authentication type. Possible options are IAM authentication, * password and no password.

*/ inline void SetType(const InputAuthenticationType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Specifies the authentication type. Possible options are IAM authentication, * password and no password.

*/ inline void SetType(InputAuthenticationType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Specifies the authentication type. Possible options are IAM authentication, * password and no password.

*/ inline AuthenticationMode& WithType(const InputAuthenticationType& value) { SetType(value); return *this;} /** *

Specifies the authentication type. Possible options are IAM authentication, * password and no password.

*/ inline AuthenticationMode& WithType(InputAuthenticationType&& value) { SetType(std::move(value)); return *this;} /** *

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

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

Specifies the passwords to use for authentication if Type is set * to password.

*/ inline AuthenticationMode& AddPasswords(const char* value) { m_passwordsHasBeenSet = true; m_passwords.push_back(value); return *this; } private: InputAuthenticationType m_type; bool m_typeHasBeenSet = false; Aws::Vector m_passwords; bool m_passwordsHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws