# 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 .event_stream_cloud_event_group_role_assigned_object_group_1_type_enum import (
    EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum,
)


class EventStreamCloudEventGroupRoleAssignedObjectGroup1(UniversalBaseModel):
    """
    Reference to an organization group
    """

    id: str = pydantic.Field()
    """
    The unique identifier for the group.
    """

    external_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The external identifier for the group.
    """

    type: EventStreamCloudEventGroupRoleAssignedObjectGroup1TypeEnum
    organization_id: str = pydantic.Field()
    """
    The organization ID associated with the group.
    """

    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
