Class ClassAnonymizationSettings.Builder
java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.generic.ClassAnonymizationSettings.Builder
- Enclosing class:
- ClassAnonymizationSettings
Only specified parameters will be taken into account during anonymization.
If any of the parameters are left undefined or set to
null, specific anonymization will be applied
to all the members of that parameter. FieldType array has to be set. Empty array is allowed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()BuildsClassAnonymizationSettingsfrom the specified parameters.setCountry(Country country) If set, specified fields will be anonymized on documents issued by specified country only.setDocumentNumberAnonymizationSettings(DocumentNumberAnonymizationSettings documentNumberAnonymizationSettings) If set, the first and the last digits of document number will be shown according to values inDocumentNumberAnonymizationSettings.If set, specified fields will be anonymized on documents issued by specified region only.If set, specified fields will be anonymized on documents of specified type only.
-
Constructor Details
-
Builder
Constructs a newClassAnonymizationSettings.Builderinstance.FieldTypearray has to be set, even if empty. Otherwise,IllegalArgumentExceptionwill be thrown.- Parameters:
fields- fields to be anonymized- Throws:
IllegalArgumentException- if the passedfieldsarray isnull
-
-
Method Details
-
build
BuildsClassAnonymizationSettingsfrom the specified parameters.- Returns:
- built
ClassAnonymizationSettings
-
setCountry
If set, specified fields will be anonymized on documents issued by specified country only. Otherwise, issuing country will not be taken into account during anonymization.- Parameters:
country- country to be set- Returns:
- this builder
-
setRegion
If set, specified fields will be anonymized on documents issued by specified region only. Otherwise, issuing region will not be taken into account during anonymization.- Parameters:
region- region to be set- Returns:
- this builder
-
setType
If set, specified fields will be anonymized on documents of specified type only. Otherwise, document type will not be taken into account during anonymization.- Parameters:
type- type to be set- Returns:
- this builder
-
setDocumentNumberAnonymizationSettings
public ClassAnonymizationSettings.Builder setDocumentNumberAnonymizationSettings(@Nullable DocumentNumberAnonymizationSettings documentNumberAnonymizationSettings) If set, the first and the last digits of document number will be shown according to values inDocumentNumberAnonymizationSettings.- Parameters:
documentNumberAnonymizationSettings- documentNumberAnonymizationSettings to be set- Returns:
- this builder
-