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. At least one FieldType
has to be set in order
for the setting to be applied.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
BuildsClassAnonymizationSettings
from 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.Builder
instance. At least oneFieldType
has to be set. Otherwise,IllegalArgumentException
will be thrown.- Parameters:
fields
- fields to be anonymized- Throws:
IllegalArgumentException
- if the passedfields
array isnull
or empty
-
-
Method Details
-
build
BuildsClassAnonymizationSettings
from 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
-