/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace DatabaseMigrationService { namespace Model { /** *

Provides information that defines a MongoDB endpoint.

See * Also:

AWS * API Reference

*/ class AWS_DATABASEMIGRATIONSERVICE_API MongoDbSettings { public: MongoDbSettings(); MongoDbSettings(Aws::Utils::Json::JsonView jsonValue); MongoDbSettings& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The user name you use to access the MongoDB source endpoint.

*/ inline const Aws::String& GetUsername() const{ return m_username; } /** *

The user name you use to access the MongoDB source endpoint.

*/ inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; } /** *

The user name you use to access the MongoDB source endpoint.

*/ inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; } /** *

The user name you use to access the MongoDB source endpoint.

*/ inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); } /** *

The user name you use to access the MongoDB source endpoint.

*/ inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); } /** *

The user name you use to access the MongoDB source endpoint.

*/ inline MongoDbSettings& WithUsername(const Aws::String& value) { SetUsername(value); return *this;} /** *

The user name you use to access the MongoDB source endpoint.

*/ inline MongoDbSettings& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;} /** *

The user name you use to access the MongoDB source endpoint.

*/ inline MongoDbSettings& WithUsername(const char* value) { SetUsername(value); return *this;} /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline const Aws::String& GetPassword() const{ return m_password; } /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline bool PasswordHasBeenSet() const { return m_passwordHasBeenSet; } /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline void SetPassword(const Aws::String& value) { m_passwordHasBeenSet = true; m_password = value; } /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline void SetPassword(Aws::String&& value) { m_passwordHasBeenSet = true; m_password = std::move(value); } /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline void SetPassword(const char* value) { m_passwordHasBeenSet = true; m_password.assign(value); } /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline MongoDbSettings& WithPassword(const Aws::String& value) { SetPassword(value); return *this;} /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline MongoDbSettings& WithPassword(Aws::String&& value) { SetPassword(std::move(value)); return *this;} /** *

The password for the user account you use to access the MongoDB source * endpoint.

*/ inline MongoDbSettings& WithPassword(const char* value) { SetPassword(value); return *this;} /** *

The name of the server on the MongoDB source endpoint.

*/ inline const Aws::String& GetServerName() const{ return m_serverName; } /** *

The name of the server on the MongoDB source endpoint.

*/ inline bool ServerNameHasBeenSet() const { return m_serverNameHasBeenSet; } /** *

The name of the server on the MongoDB source endpoint.

*/ inline void SetServerName(const Aws::String& value) { m_serverNameHasBeenSet = true; m_serverName = value; } /** *

The name of the server on the MongoDB source endpoint.

*/ inline void SetServerName(Aws::String&& value) { m_serverNameHasBeenSet = true; m_serverName = std::move(value); } /** *

The name of the server on the MongoDB source endpoint.

*/ inline void SetServerName(const char* value) { m_serverNameHasBeenSet = true; m_serverName.assign(value); } /** *

The name of the server on the MongoDB source endpoint.

*/ inline MongoDbSettings& WithServerName(const Aws::String& value) { SetServerName(value); return *this;} /** *

The name of the server on the MongoDB source endpoint.

*/ inline MongoDbSettings& WithServerName(Aws::String&& value) { SetServerName(std::move(value)); return *this;} /** *

The name of the server on the MongoDB source endpoint.

*/ inline MongoDbSettings& WithServerName(const char* value) { SetServerName(value); return *this;} /** *

The port value for the MongoDB source endpoint.

*/ inline int GetPort() const{ return m_port; } /** *

The port value for the MongoDB source endpoint.

*/ inline bool PortHasBeenSet() const { return m_portHasBeenSet; } /** *

The port value for the MongoDB source endpoint.

*/ inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } /** *

The port value for the MongoDB source endpoint.

*/ inline MongoDbSettings& WithPort(int value) { SetPort(value); return *this;} /** *

The database name on the MongoDB source endpoint.

*/ inline const Aws::String& GetDatabaseName() const{ return m_databaseName; } /** *

The database name on the MongoDB source endpoint.

*/ inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; } /** *

The database name on the MongoDB source endpoint.

*/ inline void SetDatabaseName(const Aws::String& value) { m_databaseNameHasBeenSet = true; m_databaseName = value; } /** *

The database name on the MongoDB source endpoint.

*/ inline void SetDatabaseName(Aws::String&& value) { m_databaseNameHasBeenSet = true; m_databaseName = std::move(value); } /** *

The database name on the MongoDB source endpoint.

*/ inline void SetDatabaseName(const char* value) { m_databaseNameHasBeenSet = true; m_databaseName.assign(value); } /** *

The database name on the MongoDB source endpoint.

*/ inline MongoDbSettings& WithDatabaseName(const Aws::String& value) { SetDatabaseName(value); return *this;} /** *

The database name on the MongoDB source endpoint.

*/ inline MongoDbSettings& WithDatabaseName(Aws::String&& value) { SetDatabaseName(std::move(value)); return *this;} /** *

The database name on the MongoDB source endpoint.

*/ inline MongoDbSettings& WithDatabaseName(const char* value) { SetDatabaseName(value); return *this;} /** *

The authentication type you use to access the MongoDB source endpoint.

*

When when set to "no", user name and password parameters are not * used and can be empty.

*/ inline const AuthTypeValue& GetAuthType() const{ return m_authType; } /** *

The authentication type you use to access the MongoDB source endpoint.

*

When when set to "no", user name and password parameters are not * used and can be empty.

*/ inline bool AuthTypeHasBeenSet() const { return m_authTypeHasBeenSet; } /** *

The authentication type you use to access the MongoDB source endpoint.

*

When when set to "no", user name and password parameters are not * used and can be empty.

*/ inline void SetAuthType(const AuthTypeValue& value) { m_authTypeHasBeenSet = true; m_authType = value; } /** *

The authentication type you use to access the MongoDB source endpoint.

*

When when set to "no", user name and password parameters are not * used and can be empty.

*/ inline void SetAuthType(AuthTypeValue&& value) { m_authTypeHasBeenSet = true; m_authType = std::move(value); } /** *

The authentication type you use to access the MongoDB source endpoint.

*

When when set to "no", user name and password parameters are not * used and can be empty.

*/ inline MongoDbSettings& WithAuthType(const AuthTypeValue& value) { SetAuthType(value); return *this;} /** *

The authentication type you use to access the MongoDB source endpoint.

*

When when set to "no", user name and password parameters are not * used and can be empty.

*/ inline MongoDbSettings& WithAuthType(AuthTypeValue&& value) { SetAuthType(std::move(value)); return *this;} /** *

The authentication mechanism you use to access the MongoDB source * endpoint.

For the default value, in MongoDB version 2.x, * "default" is "mongodb_cr". For MongoDB version 3.x or * later, "default" is "scram_sha_1". This setting isn't * used when AuthType is set to "no".

*/ inline const AuthMechanismValue& GetAuthMechanism() const{ return m_authMechanism; } /** *

The authentication mechanism you use to access the MongoDB source * endpoint.

For the default value, in MongoDB version 2.x, * "default" is "mongodb_cr". For MongoDB version 3.x or * later, "default" is "scram_sha_1". This setting isn't * used when AuthType is set to "no".

*/ inline bool AuthMechanismHasBeenSet() const { return m_authMechanismHasBeenSet; } /** *

The authentication mechanism you use to access the MongoDB source * endpoint.

For the default value, in MongoDB version 2.x, * "default" is "mongodb_cr". For MongoDB version 3.x or * later, "default" is "scram_sha_1". This setting isn't * used when AuthType is set to "no".

*/ inline void SetAuthMechanism(const AuthMechanismValue& value) { m_authMechanismHasBeenSet = true; m_authMechanism = value; } /** *

The authentication mechanism you use to access the MongoDB source * endpoint.

For the default value, in MongoDB version 2.x, * "default" is "mongodb_cr". For MongoDB version 3.x or * later, "default" is "scram_sha_1". This setting isn't * used when AuthType is set to "no".

*/ inline void SetAuthMechanism(AuthMechanismValue&& value) { m_authMechanismHasBeenSet = true; m_authMechanism = std::move(value); } /** *

The authentication mechanism you use to access the MongoDB source * endpoint.

For the default value, in MongoDB version 2.x, * "default" is "mongodb_cr". For MongoDB version 3.x or * later, "default" is "scram_sha_1". This setting isn't * used when AuthType is set to "no".

*/ inline MongoDbSettings& WithAuthMechanism(const AuthMechanismValue& value) { SetAuthMechanism(value); return *this;} /** *

The authentication mechanism you use to access the MongoDB source * endpoint.

For the default value, in MongoDB version 2.x, * "default" is "mongodb_cr". For MongoDB version 3.x or * later, "default" is "scram_sha_1". This setting isn't * used when AuthType is set to "no".

*/ inline MongoDbSettings& WithAuthMechanism(AuthMechanismValue&& value) { SetAuthMechanism(std::move(value)); return *this;} /** *

Specifies either document or table mode.

Default value is * "none". Specify "none" to use document mode. Specify * "one" to use table mode.

*/ inline const NestingLevelValue& GetNestingLevel() const{ return m_nestingLevel; } /** *

Specifies either document or table mode.

Default value is * "none". Specify "none" to use document mode. Specify * "one" to use table mode.

*/ inline bool NestingLevelHasBeenSet() const { return m_nestingLevelHasBeenSet; } /** *

Specifies either document or table mode.

Default value is * "none". Specify "none" to use document mode. Specify * "one" to use table mode.

*/ inline void SetNestingLevel(const NestingLevelValue& value) { m_nestingLevelHasBeenSet = true; m_nestingLevel = value; } /** *

Specifies either document or table mode.

Default value is * "none". Specify "none" to use document mode. Specify * "one" to use table mode.

*/ inline void SetNestingLevel(NestingLevelValue&& value) { m_nestingLevelHasBeenSet = true; m_nestingLevel = std::move(value); } /** *

Specifies either document or table mode.

Default value is * "none". Specify "none" to use document mode. Specify * "one" to use table mode.

*/ inline MongoDbSettings& WithNestingLevel(const NestingLevelValue& value) { SetNestingLevel(value); return *this;} /** *

Specifies either document or table mode.

Default value is * "none". Specify "none" to use document mode. Specify * "one" to use table mode.

*/ inline MongoDbSettings& WithNestingLevel(NestingLevelValue&& value) { SetNestingLevel(std::move(value)); return *this;} /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline const Aws::String& GetExtractDocId() const{ return m_extractDocId; } /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline bool ExtractDocIdHasBeenSet() const { return m_extractDocIdHasBeenSet; } /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline void SetExtractDocId(const Aws::String& value) { m_extractDocIdHasBeenSet = true; m_extractDocId = value; } /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline void SetExtractDocId(Aws::String&& value) { m_extractDocIdHasBeenSet = true; m_extractDocId = std::move(value); } /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline void SetExtractDocId(const char* value) { m_extractDocIdHasBeenSet = true; m_extractDocId.assign(value); } /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline MongoDbSettings& WithExtractDocId(const Aws::String& value) { SetExtractDocId(value); return *this;} /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline MongoDbSettings& WithExtractDocId(Aws::String&& value) { SetExtractDocId(std::move(value)); return *this;} /** *

Specifies the document ID. Use this setting when NestingLevel * is set to "none".

Default value is "false". *

*/ inline MongoDbSettings& WithExtractDocId(const char* value) { SetExtractDocId(value); return *this;} /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline const Aws::String& GetDocsToInvestigate() const{ return m_docsToInvestigate; } /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline bool DocsToInvestigateHasBeenSet() const { return m_docsToInvestigateHasBeenSet; } /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline void SetDocsToInvestigate(const Aws::String& value) { m_docsToInvestigateHasBeenSet = true; m_docsToInvestigate = value; } /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline void SetDocsToInvestigate(Aws::String&& value) { m_docsToInvestigateHasBeenSet = true; m_docsToInvestigate = std::move(value); } /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline void SetDocsToInvestigate(const char* value) { m_docsToInvestigateHasBeenSet = true; m_docsToInvestigate.assign(value); } /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline MongoDbSettings& WithDocsToInvestigate(const Aws::String& value) { SetDocsToInvestigate(value); return *this;} /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline MongoDbSettings& WithDocsToInvestigate(Aws::String&& value) { SetDocsToInvestigate(std::move(value)); return *this;} /** *

Indicates the number of documents to preview to determine the document * organization. Use this setting when NestingLevel is set to * "one".

Must be a positive value greater than * 0. Default value is 1000.

*/ inline MongoDbSettings& WithDocsToInvestigate(const char* value) { SetDocsToInvestigate(value); return *this;} /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline const Aws::String& GetAuthSource() const{ return m_authSource; } /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline bool AuthSourceHasBeenSet() const { return m_authSourceHasBeenSet; } /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline void SetAuthSource(const Aws::String& value) { m_authSourceHasBeenSet = true; m_authSource = value; } /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline void SetAuthSource(Aws::String&& value) { m_authSourceHasBeenSet = true; m_authSource = std::move(value); } /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline void SetAuthSource(const char* value) { m_authSourceHasBeenSet = true; m_authSource.assign(value); } /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline MongoDbSettings& WithAuthSource(const Aws::String& value) { SetAuthSource(value); return *this;} /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline MongoDbSettings& WithAuthSource(Aws::String&& value) { SetAuthSource(std::move(value)); return *this;} /** *

The MongoDB database name. This setting isn't used when * AuthType is set to "no".

The default is * "admin".

*/ inline MongoDbSettings& WithAuthSource(const char* value) { SetAuthSource(value); return *this;} /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline MongoDbSettings& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline MongoDbSettings& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The AWS KMS key identifier that is used to encrypt the content on the * replication instance. If you don't specify a value for the KmsKeyId * parameter, then AWS DMS uses your default encryption key. AWS KMS creates the * default encryption key for your AWS account. Your AWS account has a different * default encryption key for each AWS Region.

*/ inline MongoDbSettings& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} private: Aws::String m_username; bool m_usernameHasBeenSet; Aws::String m_password; bool m_passwordHasBeenSet; Aws::String m_serverName; bool m_serverNameHasBeenSet; int m_port; bool m_portHasBeenSet; Aws::String m_databaseName; bool m_databaseNameHasBeenSet; AuthTypeValue m_authType; bool m_authTypeHasBeenSet; AuthMechanismValue m_authMechanism; bool m_authMechanismHasBeenSet; NestingLevelValue m_nestingLevel; bool m_nestingLevelHasBeenSet; Aws::String m_extractDocId; bool m_extractDocIdHasBeenSet; Aws::String m_docsToInvestigate; bool m_docsToInvestigateHasBeenSet; Aws::String m_authSource; bool m_authSourceHasBeenSet; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet; }; } // namespace Model } // namespace DatabaseMigrationService } // namespace Aws