from pydantic import BaseModel
from pydantic.fields import Optional, List
from heimdall.models.filter import Filter
from heimdall.models.mask import Mask
[docs]class UserSelector(BaseModel):
match: str
tags: List[str]
[docs]class ColumnSelector(BaseModel):
tags: Optional[List[str]]
names: Optional[List[str]]
[docs]class Selector(BaseModel):
user: Optional[UserSelector]
column: Optional[ColumnSelector]
[docs]class DataPolicy(BaseModel):
priority: int
type: str
selector: Optional[Selector]
mask: Optional[Mask]
filters: Optional[List[Filter]]
dataset_id: str
name: Optional[str]
description: Optional[str]