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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .error import Error
from .retrieve_channel_response import RetrieveChannelResponse


class BulkRetrieveChannelsResponse(UncheckedBaseModel):
    """
    Defines the fields that are included in the request body for the
    [BulkRetrieveChannels](api-endpoint:Channels-BulkRetrieveChannels) endpoint.
    """

    errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None)
    """
    Information about errors encountered during the request.
    """

    responses: typing.Optional[typing.Dict[str, RetrieveChannelResponse]] = pydantic.Field(default=None)
    """
    A map of channel IDs to channel responses which tell whether
    retrieval for a specific channel is success or not.
    Channel response of a success retrieval would contain channel info
    whereas channel response of a failed retrieval would have error info.
    """

    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
