from typing import Optional


class Time:
  cron_exp: str
  duration: int


class Policy:
  subject: str
  action: str
  object: str

  field: Optional[str]
  filter: Optional[str]

  time: Optional[Time]
  location: Optional[str]


class AuthorizationResponse:
  granted: bool
  policies: Optional[Policy]
