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

from ......core.unchecked_base_model import UncheckedBaseModel
import typing
from ...base.types.hostname import Hostname
import pydantic
from ...base.types.ip_address import IpAddress
from .organization import Organization
from ......core.pydantic_utilities import IS_PYDANTIC_V2


class Reporter(UncheckedBaseModel):
    """
    The entity from which an event or finding was reported.
    """

    hostname: typing.Optional[Hostname] = pydantic.Field(default=None)
    """
    The hostname of the entity from which the event or finding was reported.
    """

    ip: typing.Optional[IpAddress] = pydantic.Field(default=None)
    """
    The IP address of the entity from which the event or finding was reported.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the entity from which the event or finding was reported.
    """

    org: typing.Optional[Organization] = pydantic.Field(default=None)
    """
    The organization properties of the entity that reported the event or finding.
    """

    uid: typing.Optional[str] = pydantic.Field(default=None)
    """
    The unique identifier of the entity from which the event or finding was reported.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow"
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
