# 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 .event_type_metadata import EventTypeMetadata


class ListEventTypesResponse(UncheckedBaseModel):
    """
    Defines the fields that are included in the response body of
    a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) endpoint.

    Note: if there are errors processing the request, the event types field will not be
    present.
    """

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

    event_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The list of event types.
    """

    metadata: typing.Optional[typing.List[EventTypeMetadata]] = pydantic.Field(default=None)
    """
    Contains the metadata of an event type. For more information, see [EventTypeMetadata](entity:EventTypeMetadata).
    """

    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
