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

from ......core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .sharing_permission_sharing_permission_type_id import (
    SharingPermissionSharingPermissionTypeId,
)
from ......core.pydantic_utilities import IS_PYDANTIC_V2


class SharingPermission(UncheckedBaseModel):
    """
    The Sharing Permission type represents the permissions granted to recipients via a Sharing object.
    """

    sharing_permission_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The sharing permission type, normalized to the caption of the sharing_permission_type_id value.
    """

    sharing_permission_type_id: SharingPermissionSharingPermissionTypeId = (
        pydantic.Field()
    )
    """
    The normalized identifier of the sharing permission type.
    """

    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
