# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .access_item import AccessItem
from .owned_resource import OwnedResource
from .shared_resource import SharedResource


class MyAccessResponse(UniversalBaseModel):
    """
    Full access manifest for the current user.
    """

    user_id: str
    organization_id: str
    role_names: typing.List[str]
    preset: str
    preset_description: str
    access_items: typing.List[AccessItem]
    owned_resources: typing.List[OwnedResource]
    shared_resources: typing.List[SharedResource]
    owned_count: int
    shared_count: int

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
