Package com.mongodb
Class AutoEncryptionSettings.Builder
-
- com.mongodb.AutoEncryptionSettings.Builder
-
- Enclosing class:
- AutoEncryptionSettings
@NotThreadSafe public static final class AutoEncryptionSettings.Builder extends
A builder forAutoEncryptionSettings
so thatAutoEncryptionSettings
can be immutable, and to support easier construction through chaining.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoEncryptionSettings
build()
Build an instance ofAutoEncryptionSettings
.AutoEncryptionSettings.Builder
bypassAutoEncryption(boolean bypassAutoEncryption)
Sets whether auto-encryption should be bypassed.AutoEncryptionSettings.Builder
<,> extraOptions)
Sets the extra options.AutoEncryptionSettings.Builder
keyVaultMongoClientSettings(MongoClientSettings keyVaultMongoClientSettings)
Sets the key vault settings.AutoEncryptionSettings.Builder
keyVaultNamespace)
Sets the key vault namespaceAutoEncryptionSettings.Builder
<,<,>> kmsProviders)
Sets the KMS providers map.AutoEncryptionSettings.Builder
<,BsonDocument> schemaMap)
Sets the map from namespace to local schema document
-
-
-
Method Detail
-
keyVaultMongoClientSettings
public AutoEncryptionSettings.Builder keyVaultMongoClientSettings(MongoClientSettings keyVaultMongoClientSettings)
Sets the key vault settings.- Parameters:
keyVaultMongoClientSettings
- the key vault mongo client settings, which may be null.- Returns:
- this
- See Also:
AutoEncryptionSettings.getKeyVaultMongoClientSettings()
-
keyVaultNamespace
public keyVaultNamespace)
Sets the key vault namespace- Parameters:
keyVaultNamespace
- the key vault namespace, which may not be null- Returns:
- this
- See Also:
AutoEncryptionSettings.getKeyVaultNamespace()
-
kmsProviders
public <,<,>> kmsProviders)
Sets the KMS providers map.- Parameters:
kmsProviders
- the KMS providers map, which may not be null- Returns:
- this
- See Also:
AutoEncryptionSettings.getKmsProviders()
-
schemaMap
public <,BsonDocument> schemaMap)
Sets the map from namespace to local schema document- Parameters:
schemaMap
- the map from namespace to local schema document- Returns:
- this
- See Also:
AutoEncryptionSettings.getSchemaMap()
-
extraOptions
public <,> extraOptions)
Sets the extra options.- Parameters:
extraOptions
- the extra options, which may not be null- Returns:
- this
- See Also:
AutoEncryptionSettings.getExtraOptions()
-
bypassAutoEncryption
public AutoEncryptionSettings.Builder bypassAutoEncryption(boolean bypassAutoEncryption)
Sets whether auto-encryption should be bypassed.- Parameters:
bypassAutoEncryption
- whether auto-encryption should be bypassed- Returns:
- this
- See Also:
AutoEncryptionSettings.isBypassAutoEncryption()
-
build
public AutoEncryptionSettings build()
Build an instance ofAutoEncryptionSettings
.- Returns:
- the settings from this builder
-
-