# 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 .self_service_profile_sso_ticket_google_workspace_config import SelfServiceProfileSsoTicketGoogleWorkspaceConfig
from .self_service_profile_sso_ticket_provisioning_scope_enum import SelfServiceProfileSsoTicketProvisioningScopeEnum


class SelfServiceProfileSsoTicketProvisioningConfig(UniversalBaseModel):
    """
    Configuration for the setup of Provisioning in the self-service flow.
    """

    scopes: typing.Optional[typing.List[SelfServiceProfileSsoTicketProvisioningScopeEnum]] = pydantic.Field(
        default=None
    )
    """
    The scopes of the SCIM tokens generated during the self-service flow.
    """

    google_workspace: typing.Optional[SelfServiceProfileSsoTicketGoogleWorkspaceConfig] = None
    token_lifetime: typing.Optional[int] = pydantic.Field(default=None)
    """
    Lifetime of the tokens in seconds. Must be greater than 900. If not provided, the tokens don't expire.
    """

    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
