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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .update_team_member_response import UpdateTeamMemberResponse
import pydantic
from .error import Error
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class BatchUpdateTeamMembersResponse(UncheckedBaseModel):
    """
    Represents a response from a bulk update request containing the updated `TeamMember` objects or error messages.
    """

    team_members: typing.Optional[typing.Dict[str, UpdateTeamMemberResponse]] = pydantic.Field(default=None)
    """
    The successfully updated `TeamMember` objects. Each key is the `team_member_id` that maps to the `UpdateTeamMemberRequest`.
    """

    errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None)
    """
    The errors that occurred during the request.
    """

    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
