# 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 .agent_role_role import AgentRoleRole


class AgentRole(UniversalBaseModel):
    """
    Agent-specific role assignment.
    """

    agent_key: str = pydantic.Field()
    """
    The ID of the agent this role applies to.
    """

    role: AgentRoleRole = pydantic.Field()
    """
    The role assigned for this specific agent.
    * `agent_administrator` - Full administrative access to the agent including deletion and configuration.
    * `agent_viewer` - Read-only access to view agent configuration, sessions, events, instructions, and tools.
    * `agent_developer` - Can modify agent configuration, create/manage sessions, update tools and instructions.
    * `agent_user` - Limited access to interact with the agent by creating sessions and sending inputs. Cannot view agent configuration or modify settings.
    """

    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
