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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .team_member import TeamMember
import pydantic
from .error import Error
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class SearchTeamMembersResponse(UncheckedBaseModel):
    """
    Represents a response from a search request containing a filtered list of `TeamMember` objects.
    """

    team_members: typing.Optional[typing.List[TeamMember]] = pydantic.Field(default=None)
    """
    The filtered list of `TeamMember` objects.
    """

    cursor: typing.Optional[str] = pydantic.Field(default=None)
    """
    The opaque cursor for fetching the next page. For more information, see
    [pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
    """

    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
