Source code for gateway.models.mask

from typing import List, Any
from pydantic import BaseModel
from pydantic.fields import Optional, Dict, Field


[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] hash: Optional[MaskHash] redact: Optional[Dict[str, Any]] bucket_number: Optional[MaskBucketNumber] bucket_date: Optional[MaskBucketDate] rand_pattern: Optional[MaskRandPattern] rand_regexify: Optional[MaskRandRegexify] regex_replace: Optional[MaskRegexReplace] supported_data_types: Optional[List[str]] = Field(alias="supportedDataTypes")