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

from ...core.unchecked_base_model import UncheckedBaseModel
import typing
from ...organization_base.types.organization_id import OrganizationId
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class RoleOrganizations(UncheckedBaseModel):
    ids: typing.List[OrganizationId] = pydantic.Field()
    """
    List of organization ids that this role definition grants access to. Use "\*" to grant access to all organization ids.
    """

    labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    List of organization labels this role definition grants access to.
    """

    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
