from __future__ import annotations
from typing import TYPE_CHECKING

from typing import List, Optional, Union


from pydantic.v1 import Field
from pydantic2_schemaorg.InteractAction import InteractAction


class LeaveAction(InteractAction):
    """An agent leaves an event / group with participants/friends at a location. Related actions: * [[JoinAction]]:
     The antonym of LeaveAction. * [[UnRegisterAction]]: Unlike UnRegisterAction, LeaveAction implies leaving
     a group/team of people rather than a service.

    See: https://schema.org/LeaveAction
    Model depth: 4
    """

    type_: str = Field(default="LeaveAction", alias="@type", const=True)
    event: Optional[Union[List[Union["Event", str]], "Event", str]] = Field(
        default=None,
        description="Upcoming or past event associated with this place, organization, or action.",
    )


if TYPE_CHECKING:
    from pydantic2_schemaorg.Event import Event
