# generated by datamodel-codegen:
#   filename:  <stdin>
#   timestamp: 2023-02-17T08:34:06+00:00

from __future__ import annotations

import uuid
from enum import Enum

from pydantic import BaseModel, Extra, Field, conint, constr


class UserEnum(Enum):
    global_ = 'global'


class IdEnum(Enum):
    global_ = 'global'


class PermissionRule(BaseModel):
    class Config:
        extra = Extra.forbid

    user: list[uuid.UUID | UserEnum] | None = None
    deeper: bool | None = None
    id: list[uuid.UUID | IdEnum] | None = None
    global_: bool | None = Field(None, alias='global')
    from_: bool | None = Field(None, alias='from')
    to: bool | None = None
    type: str | None = None
    expand: conint(ge=0, multiple_of=1) | None = None
    offset: conint(ge=0, multiple_of=1) | None = None
    limit: conint(ge=0, multiple_of=1) | None = None
    version: list[constr(regex=r'\d+(\.\d+)*')] | None = None
    verbose: bool | None = None
