# 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 .connector_info import ConnectorInfo


class AvailableConnectorsResponse(UniversalBaseModel):
    """
    Response schema for GET /v1/personal-connectors/available endpoint.
    """

    connectors: typing.List[ConnectorInfo] = pydantic.Field()
    """
    List of available connectors
    """

    categories: typing.List[str] = pydantic.Field()
    """
    Sorted list of unique categories
    """

    total: int = pydantic.Field()
    """
    Total number of connectors (before pagination)
    """

    total_connected: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of connected connectors
    """

    returned: int = pydantic.Field()
    """
    Number of connectors returned (after pagination)
    """

    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
