Source code for gateway.models.policy_data

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

from gateway.models.filter import Filter
from gateway.models.mask import Mask


[docs]class UserSelector(BaseModel): match: str tags: List[str]
[docs]class ColumnSelector(BaseModel): column: Optional[str] policyName: Optional[str] masks: Optional[List[str]] tags: Optional[List[str]]
[docs]class Selector(BaseModel): user: Optional[UserSelector] column: Optional[ColumnSelector]
[docs]class PolicyData(BaseModel): priority: int type: str selector: Optional[Selector] mask: Optional[Mask] filters: Optional[List[Filter]] name: Optional[str] description: Optional[str] depot: Optional[str] collection: Optional[str] dataset: Optional[str]