Source code for heimdall.models.mask

from typing import List, Any

from pydantic import BaseModel
from pydantic.fields import Optional, Dict


[docs]class MaskHash(BaseModel): algo: str
[docs]class MaskPassThrough(BaseModel): pass
[docs]class MaskBucketNumber(BaseModel): buckets: List[int]
[docs]class MaskBucketDate(BaseModel): precision: str
[docs]class MaskRandPattern(BaseModel): pattern: str
[docs]class MaskRandRegexify(BaseModel): pattern: str
[docs]class MaskRegexReplace(BaseModel): pattern: str replacement: str
[docs]class Mask(BaseModel): operator: str pass_through: Optional[MaskPassThrough] = None hash: Optional[MaskHash] = None redact: Optional[Dict[str, Any]] = None bucket_number: Optional[MaskBucketNumber] = None bucket_date: Optional[MaskBucketDate] = None rand_pattern: Optional[MaskRandPattern] = None rand_regexify: Optional[MaskRandRegexify] = None regex_replace: Optional[MaskRegexReplace] = None supported_data_types: Optional[List[str]] = None