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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class UserOrganizationCreate(UniversalBaseModel):
    """
    Schema for creating a user's membership to an organization.
    """

    user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The user's ID.
    """

    email: typing.Optional[str] = pydantic.Field(default=None)
    """
    The user's email address.
    """

    project_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The project IDs to add the user to.
    """

    role_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The role ID to assign to the user.
    """

    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
