# 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 .issue_source_object_response_body_type import IssueSourceObjectResponseBodyType


class IssueSourceObjectResponseBody(UniversalBaseModel):
    """
    Contains information about where an issue came from.
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the issue's source object. The format depends on the 'type'. Included if 'type' is not 'ad-hoc'.
    """

    type: IssueSourceObjectResponseBodyType = pydantic.Field()
    """
    The type of issue source.  Valid values: `form`, `ad-hoc`
    """

    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
